# HG changeset patch # User ddehaven # Date 1485806651 28800 # Node ID 362db50cabe6a2b02bfa7e9d4c9957c31531038c # Parent 31e01190e3c5910c6d57c4e90d61ed9da181e4fd# Parent be9fca030f91c4ac1b90a342a3a6b5b3f2f4c3de Merge diff -r 31e01190e3c5 -r 362db50cabe6 jdk/.hgtags --- a/jdk/.hgtags Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/.hgtags Mon Jan 30 12:04:11 2017 -0800 @@ -396,3 +396,4 @@ d27bab22ff62823902d93d1d35ca397cfd50d059 jdk-9+151 a20f2cf90762673e1bc4980fd6597e70a2578045 jdk-9+152 1c4411322327aea3f91011ec3977a12a05b09629 jdk-9+153 +c97e7a8b8da062b9070df442f9cf308e10845fb7 jdk-9+154 diff -r 31e01190e3c5 -r 362db50cabe6 jdk/make/lib/CoreLibraries.gmk --- a/jdk/make/lib/CoreLibraries.gmk Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/make/lib/CoreLibraries.gmk Mon Jan 30 12:04:11 2017 -0800 @@ -387,6 +387,7 @@ -export:JLI_MemFree \ -export:JLI_InitArgProcessing \ -export:JLI_PreprocessArg \ + -export:JLI_AddArgsFromEnvVar \ -export:JLI_GetAppArgIndex, \ LIBS_unix := $(LIBZ), \ LIBS_linux := $(LIBDL) -lc -lpthread, \ diff -r 31e01190e3c5 -r 362db50cabe6 jdk/make/lib/Lib-jdk.sctp.gmk --- a/jdk/make/lib/Lib-jdk.sctp.gmk Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/make/lib/Lib-jdk.sctp.gmk Mon Jan 30 12:04:11 2017 -0800 @@ -30,9 +30,6 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix) ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix)) - # DISABLED_WARNINGS_gcc := unused-parameter needed to - # suppress unused parameters required by exported JNI functions. - $(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \ LIBRARY := sctp, \ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ @@ -45,7 +42,6 @@ $(LIBJAVA_HEADER_FLAGS) \ -I$(SUPPORT_OUTPUTDIR)/headers/jdk.sctp \ -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ - DISABLED_WARNINGS_gcc := unused-parameter, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff -r 31e01190e3c5 -r 362db50cabe6 jdk/make/mapfiles/libjli/mapfile-vers --- a/jdk/make/mapfiles/libjli/mapfile-vers Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/make/mapfiles/libjli/mapfile-vers Mon Jan 30 12:04:11 2017 -0800 @@ -42,6 +42,7 @@ JLI_MemFree; JLI_InitArgProcessing; JLI_PreprocessArg; + JLI_AddArgsFromEnvVar; JLI_GetAppArgIndex; local: diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java --- a/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/javax/crypto/JceSecurityManager.java Mon Jan 30 12:04:11 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -25,6 +25,7 @@ package javax.crypto; +import java.lang.reflect.Module; import java.security.*; import java.net.*; import java.util.*; @@ -227,38 +228,55 @@ return (CryptoPermission)enum_.nextElement(); } - // See bug 4341369 & 4334690 for more info. + // Only used by javax.crypto.Cipher constructor to disallow Cipher + // objects being constructed by untrusted code (See bug 4341369 & + // 4334690 for more info). boolean isCallerTrusted(Provider provider) { - if (ProviderVerifier.isTrustedCryptoProvider(provider)) { - // fast path - return true; - } - // Get the caller and its codebase. Class[] context = getClassContext(); - URL callerCodeBase = null; - int i; - for (i=0; i= 3) { + // context[0]: class javax.crypto.JceSecurityManager + // context[1]: class javax.crypto.Cipher (or other JCE API class) + // context[2]: this is what we are gonna check + Class caller = context[2]; + URL callerCodeBase = JceSecurity.getCodeBase(caller); + if (callerCodeBase == null) { + return true; + } + // The caller has been verified. + if (TrustedCallersCache.contains(caller)) { + return true; } - } - // The caller is in the JCE framework. - if (i == context.length) { + + // Check the association between caller and provider + Class pCls = provider.getClass(); + Module pMod = pCls.getModule(); + // If they are in the same named module or share + // the same codebase, then they are associated + boolean sameOrigin = (pMod.isNamed()? + caller.getModule().equals(pMod) : + callerCodeBase.equals(JceSecurity.getCodeBase(pCls))); + if (sameOrigin) { + // The caller is from trusted provider + if (ProviderVerifier.isTrustedCryptoProvider(provider)) { + TrustedCallersCache.addElement(caller); + return true; + } + } else { + // Don't include the provider in the subsequent + // JceSecurity.verifyProvider(...) call + provider = null; + } + + // Check whether the caller is a trusted provider. + try { + JceSecurity.verifyProvider(callerCodeBase, provider); + } catch (Exception e2) { + return false; + } + TrustedCallersCache.addElement(caller); return true; } - //The caller has been verified. - if (TrustedCallersCache.contains(context[i])) { - return true; - } - // Check whether the caller is a trusted provider. - try { - JceSecurity.verifyProvider(callerCodeBase, provider); - } catch (Exception e2) { - return false; - } - TrustedCallersCache.addElement(context[i]); - return true; + return false; } } diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java --- a/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java Mon Jan 30 12:04:11 2017 -0800 @@ -53,21 +53,21 @@ // the input stream to read the original module-info.class private final InputStream in; - // the packages in the Packages attribute + // the packages in the ModulePackages attribute private Set packages; - // the value of the Version attribute + // the value of the module_version in Module attribute private Version version; - // the value of the MainClass attribute + // the value of the ModuleMainClass attribute private String mainClass; - // the values for the TargetPlatform attribute + // the values for the ModuleTarget attribute private String osName; private String osArch; private String osVersion; - // the hashes for the Hashes attribute + // the hashes for the ModuleHashes attribute private ModuleHashes hashes; // the value of the ModuleResolution attribute @@ -78,7 +78,7 @@ } /** - * Sets the set of packages for the Packages attribute + * Sets the set of packages for the ModulePackages attribute */ public ModuleInfoExtender packages(Set packages) { this.packages = Collections.unmodifiableSet(packages); @@ -86,7 +86,7 @@ } /** - * Sets the value of the Version attribute. + * Sets the value of the module_version in Module attribute. */ public ModuleInfoExtender version(Version version) { this.version = version; @@ -94,7 +94,7 @@ } /** - * Sets the value of the MainClass attribute. + * Sets the value of the ModuleMainClass attribute. */ public ModuleInfoExtender mainClass(String mainClass) { this.mainClass = mainClass; @@ -102,7 +102,7 @@ } /** - * Sets the values for the TargetPlatform attribute. + * Sets the values for the ModuleTarget attribute. */ public ModuleInfoExtender targetPlatform(String osName, String osArch, @@ -114,7 +114,7 @@ } /** - * The Hashes attribute will be emitted to the module-info with + * The ModuleHashes attribute will be emitted to the module-info with * the hashes encapsulated in the given {@code ModuleHashes} * object. */ diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/module-info.java --- a/jdk/src/java.base/share/classes/module-info.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/module-info.java Mon Jan 30 12:04:11 2017 -0800 @@ -154,7 +154,6 @@ jdk.jartool, jdk.jlink; exports jdk.internal.misc to - java.corba, java.desktop, jdk.incubator.httpclient, java.logging, @@ -183,7 +182,6 @@ java.desktop, jdk.unsupported; exports jdk.internal.reflect to - java.corba, java.logging, java.sql, java.sql.rowset, @@ -232,7 +230,6 @@ exports sun.reflect.generics.reflectiveObjects to java.desktop; exports sun.reflect.misc to - java.corba, java.desktop, java.datatransfer, java.management, diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties Mon Jan 30 12:04:11 2017 -0800 @@ -117,7 +117,6 @@ \ -Xdebug provided for backward compatibility\n\ \ -Xdiag show additional diagnostic messages\n\ \ -Xdiag:resolver show resolver diagnostic messages\n\ -\ -Xdisable-@files disable further argument file expansion\n\ \ -Xfuture enable strictest checks, anticipating future default\n\ \ -Xint interpreted mode execution only\n\ \ -Xinternalversion\n\ @@ -158,6 +157,7 @@ \ --add-opens /=(,)*\n\ \ updates to open to\n\ \ , regardless of module declaration.\n\ +\ --disable-@files disable further argument file expansion\n\ \ --patch-module =({0})*\n\ \ Override or augment a module with classes and resources\n\ \ in JAR files or directories.\n\n\ diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties Mon Jan 30 12:04:11 2017 -0800 @@ -38,7 +38,7 @@ See Weitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a:\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\n -Xdiag:resolver Zeigt Resolver-Diagnosemeldungen\n -Xdisable-@files Deaktiviert das weitere Einblenden der Argumentdatei\n -Xfuture Aktiviert strengste Pr\u00FCfungen, 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 -version-Option\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Setzt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery)\n -Xms Setzt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe\n -Xmx Setzt die maximale Java-Heap-Gr\u00F6\u00DFe\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 freigegebene Klassendaten, wenn m\u00F6glich (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 und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -Xss Setzt Stackgr\u00F6\u00DFe des Java-Threads\n -Xverify Setzt den Modus der Bytecodeverifizierung\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet \n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --patch-module =({0})*\n Setzt ein Modul au\u00DFer Kraft oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder -Verzeichnissen.\n\nDiese Optionen sind Nicht-Standardoptionen und k\u00F6nnen ohne Ank\u00FCndigung ge\u00E4ndert werden.\n +java.launcher.X.usage=\ -Xbatch Deaktiviert Hintergrundkompilierung\n -Xbootclasspath/a:\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\n -Xdiag:resolver Zeigt Resolver-Diagnosemeldungen\n -Xfuture Aktiviert strengste Pr\u00FCfungen, 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 -version-Option\n -Xloggc: Protokolliert GC-Status in einer Datei mit Zeitstempeln\n -Xmixed Ausf\u00FChrung im gemischten Modus (Standard)\n -Xmn Setzt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n f\u00FCr die junge Generation (Nursery)\n -Xms Setzt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe\n -Xmx Setzt die maximale Java-Heap-Gr\u00F6\u00DFe\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 freigegebene Klassendaten, wenn m\u00F6glich (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 und f\u00E4hrt fort\n -XshowSettings:all\n Zeigt alle Einstellungen und f\u00E4hrt fort\n -XshowSettings:locale\n Zeigt alle gebietsschemabezogenen Einstellungen und f\u00E4hrt fort\n -XshowSettings:properties\n Zeigt alle Eigenschaftseinstellungen und f\u00E4hrt fort\n -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen und f\u00E4hrt fort\n -Xss Setzt Stackgr\u00F6\u00DFe des Java-Threads\n -Xverify Setzt den Modus der Bytecodeverifizierung\n --add-reads =(,)*\n Aktualisiert , damit gelesen wird, ungeachtet \n der Moduldeklaration. \n kann ALL-UNNAMED sein, um alle unbenannten\n Module zu lesen.\n --add-exports /=(,)*\n Aktualisiert , um in zu exportieren,\n ungeachtet der Moduldeklaration.\n kann ALL-UNNAMED sein, um in alle \n unbenannten Module zu exportieren.\n --disable-@files Deaktiviert das weitere Einblenden der Argumentdatei\n --patch-module =({0})*\n Setzt ein Modul au\u00DFer Kraft oder erweitert ein Modul mit Klassen und Ressourcen\n in JAR-Dateien oder -Verzeichnissen.\n\nDiese Optionen sind Nicht-Standardoptionen und k\u00F6nnen ohne Ank\u00FCndigung ge\u00E4ndert werden.\n # Translators please note do not translate the options themselves java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n -XstartOnFirstThread\n main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n -Xdock:name=\n Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n -Xdock:icon=\n Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obtener m\u00E1s informaci\u00F3n. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:\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 -Xdisable-@files desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\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 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 define el tama\u00F1o inicial de la pila de Java\n -Xmx 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 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 =(,)*\n actualiza para leer , independientemente\n de la declaraci\u00F3n del m\u00F3dulo. \n puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --patch-module =({0})*\n Aumentar o anular un m\u00F3dulo con clases y recursos\n en directorios y archivos JAR\n\nEstas opciones no son est\u00E1ndar y est\u00E1n sujetas a cambio sin previo aviso.\n +java.launcher.X.usage=\ -Xbatch desactivar compilaci\u00F3n de fondo\n -Xbootclasspath/a:\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 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 define el tama\u00F1o inicial de la pila de Java\n -Xmx 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 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 =(,)*\n actualiza para leer , independientemente\n de la declaraci\u00F3n del m\u00F3dulo. \n puede ser ALL-UNNAMED para leer todos los\n m\u00F3dulos sin nombre.\n --add-exports /=(,)*\n actualiza para exportar en ,\n independientemente de la declaraci\u00F3n del m\u00F3dulo.\n puede ser ALL-UNNAMED para exportar a todos los\n m\u00F3dulos sin nombre.\n --disable-@files desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\n --patch-module =({0})*\n Aumentar o anular un m\u00F3dulo con clases y recursos\n en directorios y archivos JAR\n\nEstas opciones no son est\u00E1ndar y est\u00E1n sujetas a cambio 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=\n sustituir al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n -Xdock:icon=\n sustituir al icono por defecto que se muestra en el Dock\n\n diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See http://www.oracle.com/technetwork/java/javase/documentation/index.html pour plus de d\u00E9tails. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:\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 -Xdisable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\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: 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 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 d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx 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 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 =(,)*\n met \u00E0 jour pour lire , sans tenir compte\n de la d\u00E9claration de module. \n peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports /=(,)*\n met \u00E0 jour pour exporter vers ,\n sans tenir compte de la d\u00E9claration de module.\n peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --patch-module =({0})*\n Remplacement ou augmentation d''un module avec des classes et des ressources\n dans des \ +java.launcher.X.usage=\ -Xbatch d\u00E9sactivation de la compilation en arri\u00E8re-plan\n -Xbootclasspath/a:\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: 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 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 d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n -Xmx 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 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 =(,)*\n met \u00E0 jour pour lire , sans tenir compte\n de la d\u00E9claration de module. \n peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n sans nom.\n --add-exports /=(,)*\n met \u00E0 jour pour exporter vers ,\n sans tenir compte de la d\u00E9claration de module.\n peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n les modules sans nom.\n --disable-@files d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n --patch-module =({0})*\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 ne sont pas standard et peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n # Translators please note do not translate the options themselves diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See Per ulteriori dettagli, vedere http://www.oracle.com/technetwork/java/javase/documentation/index.html. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch disabilita la compilazione in background\n -Xbootclasspath/a:\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 -Xdisable-@files disabilita l''ulteriore espansione del file di argomenti\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: registra lo stato GC in un file con indicatori orari\n -Xmixed esecuzione in modalit\u00E0 mista (impostazione predefinita)\n -Xmn imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery)\n -Xms imposta la dimensione heap Java iniziale\n -Xmx 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 imposta la dimensione dello stack di thread Java\n -Xverify imposta la modalit\u00E0 del verificatore bytecode\n --add-reads:=(,)*\n aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n -patch-module =({0})*\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=\ -Xbatch disabilita la compilazione in background\n -Xbootclasspath/a:\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: registra lo stato GC in un file con indicatori orari\n -Xmixed esecuzione in modalit\u00E0 mista (impostazione predefinita)\n -Xmn imposta le dimensioni iniziale e massima (in byte) dell''heap\n per la young generation (nursery)\n -Xms imposta la dimensione heap Java iniziale\n -Xmx 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 imposta la dimensione dello stack di thread Java\n -Xverify imposta la modalit\u00E0 del verificatore bytecode\n --add-reads:=(,)*\n aggiorna per leggere , indipendentemente\n dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n moduli senza nome.\n -add-exports:/=(,)*\n aggiorna per esportare in ,\n indipendentemente dalla dichiarazione del modulo.\n pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n moduli senza nome.\n --disable-@files disabilita l''ulteriore espansione del file di argomenti\n -patch-module =({0})*\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 # 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=\n Sostituisce il nome applicazione predefinito visualizzato nel dock\n -Xdock:icon=\n Sostituisce l'icona predefinita visualizzata nel dock\n\n diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,8 +39,8 @@ See \u8A73\u7D30\u306F\u3001http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -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 -Xdisable-@files \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\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: \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 \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 Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx 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 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 =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \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 /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \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 --patch-module =({0})*\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\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\n \u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\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=\ -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: \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 \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 Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n -Xmx 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 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 =(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\n \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n \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 /=(,)*\n \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\u3092\u66F4\u65B0\u3057\u3066\u3092\u306B\n \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n \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 --disable-@files \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n --patch-module =({0})*\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\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\n \u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\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 # 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=\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=\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 diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,8 +39,8 @@ See \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://www.oracle.com/technetwork/java/javase/documentation/index.html\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -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 -Xdisable-@files \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\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: \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 \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 \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx \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 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 =(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uC744 \uC77D\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \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 /=(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uB97C \uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \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 --patch-module =({0})*\n JAR \uD30C\uC77C/\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 \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n +java.launcher.X.usage=\ -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: \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 \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 \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n -Xmx \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 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 =(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uC744 \uC77D\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \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 /=(,)*\n \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 \uB97C \uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n \uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n \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 --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 =({0})*\n JAR \uD30C\uC77C/\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 \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \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=\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=\n \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch desativar compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:\n anexar ao final do caminho de classe 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 fins de compatibilidade reversa\n -Xdiag mostrar mensagens de diagn\u00F3stico adicionais\n -Xdiag:resolver mostrar mensagens de diagn\u00F3stico do resolvedor\n -Xdisable-@files desativar expans\u00E3o de arquivo de argumento adicional\n -Xfuture ativar verifica\u00E7\u00F5es mais rigorosas, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o em modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas de vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc: registrar status de GC em um arquivo com time-stamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms definir tamanho do heap Java inicial\n -Xmx definir tamanho do heap Java m\u00E1ximo\n -Xnoclassgc desativar coleta de lixo de classe\n -Xprof emitir dados de perfil de cpu\n -Xrs reduzir uso de sinais do SO por Java/VM (consultar 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 exigir 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 relativas 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 relativas a vm e continuar\n -Xss definir tamanho de pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declara\u00E7\u00E3o do m\u00F3dulo. \n pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declara\u00E7\u00E3o do m\u00F3dulo.\n pode ser ALL-UNNAMED para exportar para todos\n os m\u00F3dulos sem nome.\n --patch-module =({0})*\n Substituir ou aumentar um m\u00F3dulo com classes e recursos\n em arquivo JAR ou diret\u00F3rios.\n\nEssas op\u00E7\u00F5es n\u00E3o s\u00E3o padr\u00E3o e est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n +java.launcher.X.usage=\ -Xbatch desativar compila\u00E7\u00E3o em segundo plano\n -Xbootclasspath/a:\n anexar ao final do caminho de classe 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 fins de compatibilidade reversa\n -Xdiag mostrar mensagens de diagn\u00F3stico adicionais\n -Xdiag:resolver mostrar mensagens de diagn\u00F3stico do resolvedor\n -Xfuture ativar verifica\u00E7\u00F5es mais rigorosas, antecipando padr\u00E3o futuro\n -Xint somente execu\u00E7\u00E3o em modo interpretado\n -Xinternalversion\n exibe informa\u00E7\u00F5es mais detalhadas de vers\u00E3o da JVM do que a\n op\u00E7\u00E3o -version\n -Xloggc: registrar status de GC em um arquivo com time-stamps\n -Xmixed execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n -Xmn define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n para a gera\u00E7\u00E3o jovem (infantil)\n -Xms definir tamanho do heap Java inicial\n -Xmx definir tamanho do heap Java m\u00E1ximo\n -Xnoclassgc desativar coleta de lixo de classe\n -Xprof emitir dados de perfil de cpu\n -Xrs reduzir uso de sinais do SO por Java/VM (consultar 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 exigir 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 relativas 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 relativas a vm e continuar\n -Xss definir tamanho de pilha de thread java\n -Xverify define o modo do verificador de c\u00F3digo de byte\n --add-reads =(,)*\n atualiza para ler , independentemente\n da declara\u00E7\u00E3o do m\u00F3dulo. \n pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n sem nome.\n --add-exports /=(,)*\n atualiza para exportar para ,\n independentemente da declara\u00E7\u00E3o do m\u00F3dulo.\n pode ser ALL-UNNAMED para exportar para todos\n os m\u00F3dulos sem nome.\n --disable-@files desativar expans\u00E3o de arquivo de argumento adicional\n --patch-module =({0})*\n Substituir ou aumentar um m\u00F3dulo com classes e recursos\n em arquivo JAR ou diret\u00F3rios.\n\nEssas op\u00E7\u00F5es n\u00E3o s\u00E3o padr\u00E3o e 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=\n substitui o nome do aplicativo padr\u00E3o exibido no encaixe\n -Xdock:icon=\n substitui o \u00EDcone exibido no encaixe\n\n diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See Se http://www.oracle.com/technetwork/java/javase/documentation/index.html f\u00F6r mer information. # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\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 -Xdisable-@files avaktivera ytterligare argumentfilsut\u00F6kning\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: logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn 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 ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx 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 ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads =(,)*\n uppdaterar att l\u00E4sa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --patch-module =({0})*\n \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n\nDe h\u00E4r alternativen \u00E4r icke-standardalternativ och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n +java.launcher.X.usage=\ -Xbatch avaktivera bakgrundskompilering\n -Xbootclasspath/a:\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: logga GC-status till en fil med tidsst\u00E4mplar\n -Xmixed exekvering i blandat l\u00E4ge (standard)\n -Xmn 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 ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n -Xmx 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 ange storlek f\u00F6r java-tr\u00E5dsstacken\n -Xverify anger l\u00E4ge f\u00F6r bytekodverifieraren\n --add-reads =(,)*\n uppdaterar att l\u00E4sa , oavsett\n moduldeklarationen. \n kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n ej namngivna moduler.\n --add-exports /=(,)*\n uppdaterar att exportera till ,\n oavsett moduldeklarationen.\n kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n ej namngivna moduler.\n --disable-@files avaktivera ytterligare argumentfilsut\u00F6kning\n --patch-module =({0})*\n \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n i JAR-filer eller kataloger.\n\nDe h\u00E4r alternativen \u00E4r icke-standardalternativ och 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=\n \u00E5sidos\u00E4tt det standardapplikationsnamn som visas i dockan\n -Xdock:icon=\n \u00E5sidos\u00E4tt den standardikon som visas i dockan\n\n diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3002 # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -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 -Xdisable-@files \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\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 \u914D\u7F6E\u6587\u4EF6\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 --patch-module \ +java.launcher.X.usage=\ -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 \u914D\u7F6E\u6587\u4EF6\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 --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\u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties --- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties Mon Jan 30 12:04:11 2017 -0800 @@ -39,7 +39,7 @@ See \u8ACB\u53C3\u95B1 http://www.oracle.com/technetwork/java/javase/documentation/index.html \u66B8\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002 # Translators please note do not translate the options themselves -java.launcher.X.usage=\ -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:\n \u52A0\u5728\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 \u70BA\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 -Xdisable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\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\u4F7F\u7528 -version \u9078\u9805\u6642\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc: \u5C07 GC \u72C0\u614B\u548C\u6642\u6233\u8A18\u9304\u81F3\u6A94\u6848\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn \u91DD\u5C0D\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u8A2D\u5B9A\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx \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 \u76E1\u53EF\u80FD\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\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 \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u6A21\u5F0F\n --add-reads =(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\n \u8B80\u53D6 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports /=(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\u4FBF\u5C07 \n \u532F\u51FA\u81F3 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --patch-module =({0})*\n \u8986\u5BEB\u6216\u52A0\u5F37 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \ +java.launcher.X.usage=\ -Xbatch \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n -Xbootclasspath/a:\n \u52A0\u5728\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 \u70BA\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\u4F7F\u7528 -version \u9078\u9805\u6642\u66F4\u70BA\u8A73\u7D30\u7684\n JVM \u7248\u672C\u8CC7\u8A0A\n -Xloggc: \u5C07 GC \u72C0\u614B\u548C\u6642\u6233\u8A18\u9304\u81F3\u6A94\u6848\n -Xmixed \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n -Xmn \u91DD\u5C0D\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u8A2D\u5B9A\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n -Xms \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n -Xmx \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 \u76E1\u53EF\u80FD\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\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 \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n -Xverify \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u6A21\u5F0F\n --add-reads =(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\n \u8B80\u53D6 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n \u6A21\u7D44\u3002\n --add-exports /=(,)*\n \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\u66F4\u65B0 \u4EE5\u4FBF\u5C07 \n \u532F\u51FA\u81F3 \u3002\n \u53EF\u5C07 \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n --disable-@files \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n --patch-module =({0})*\n \u8986\u5BEB\u6216\u52A0\u5F37 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n \ \u542B\u6709\u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n\n\u4E0A\u8FF0\u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n # Translators please note do not translate the options themselves diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/launcher/main.c --- a/jdk/src/java.base/share/native/launcher/main.c Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/launcher/main.c Mon Jan 30 12:04:11 2017 -0800 @@ -127,7 +127,22 @@ // accommodate the NULL at the end JLI_List args = JLI_List_new(argc + 1); int i = 0; - for (i = 0; i < argc; i++) { + + // Add first arg, which is the app name + JLI_List_add(args, JLI_StringDup(argv[0])); + // Append JAVA_OPTIONS + if (JLI_AddArgsFromEnvVar(args, JAVA_OPTIONS)) { + // JLI_SetTraceLauncher is not called yet + // Show _JAVA_OPTIONS content along with JAVA_OPTIONS to aid diagnosis + if (getenv(JLDEBUG_ENV_ENTRY)) { + char *tmp = getenv("_JAVA_OPTIONS"); + if (NULL != tmp) { + JLI_ReportMessage(ARG_INFO_ENVVAR, "_JAVA_OPTIONS", tmp); + } + } + } + // Iterate the rest of command line + for (i = 1; i < argc; i++) { JLI_List argsInFile = JLI_PreprocessArg(argv[i]); if (NULL == argsInFile) { JLI_List_add(args, JLI_StringDup(argv[i])); diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/libjli/args.c --- a/jdk/src/java.base/share/native/libjli/args.c Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/libjli/args.c Mon Jan 30 12:04:11 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,15 +23,19 @@ * questions. */ +#include #include #include #include +#include #ifdef DEBUG_ARGFILE #ifndef NO_JNI #define NO_JNI #endif - #define JLI_ReportMessage(p1, p2) printf((p1), (p2)) + #define JLI_ReportMessage(...) printf(__VA_ARGS__) + #define JAVA_OPTIONS "JAVA_OPTIONS" + int IsWhiteSpaceOption(const char* name) { return 1; } #else #include "java.h" #endif @@ -69,14 +73,17 @@ static int firstAppArgIndex = NOT_FOUND; static jboolean expectingNoDashArg = JNI_FALSE; -static size_t argsCount = 0; +// Initialize to 1, as the first argument is the app name and not preprocessed +static size_t argsCount = 1; static jboolean stopExpansion = JNI_FALSE; +static jboolean relaunch = JNI_FALSE; void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile) { // No expansion for relaunch - if (argsCount != 0) { + if (argsCount != 1) { + relaunch = JNI_TRUE; stopExpansion = JNI_TRUE; - argsCount = 0; + argsCount = 1; } else { stopExpansion = disableArgFile; } @@ -95,10 +102,6 @@ static void checkArg(const char *arg) { size_t idx = 0; argsCount++; - if (argsCount == 1) { - // ignore first argument, the application name - return; - } // All arguments arrive here must be a launcher argument, // ie. by now, all argfile expansions must have been performed. @@ -109,6 +112,7 @@ expectingNoDashArg = JNI_TRUE; if (JLI_StrCmp(arg, "-jar") == 0 || + JLI_StrCmp(arg, "--module") == 0 || JLI_StrCmp(arg, "-m") == 0) { // This is tricky, we do expect NoDashArg // But that is considered main class to stop expansion @@ -116,7 +120,7 @@ // We can not just update the idx here because if -jar @file // still need expansion of @file to get the argument for -jar } - } else if (JLI_StrCmp(arg, "-Xdisable-@files") == 0) { + } else if (JLI_StrCmp(arg, "--disable-@files") == 0) { stopExpansion = JNI_TRUE; } } else { @@ -407,6 +411,112 @@ return rv; } +int isTerminalOpt(char *arg) { + return JLI_StrCmp(arg, "-jar") == 0 || + JLI_StrCmp(arg, "-m") == 0 || + JLI_StrCmp(arg, "--module") == 0 || + JLI_StrCmp(arg, "--dry-run") == 0 || + JLI_StrCmp(arg, "-h") == 0 || + JLI_StrCmp(arg, "-?") == 0 || + JLI_StrCmp(arg, "-help") == 0 || + JLI_StrCmp(arg, "--help") == 0 || + JLI_StrCmp(arg, "-X") == 0 || + JLI_StrCmp(arg, "--help-extra") == 0 || + JLI_StrCmp(arg, "-version") == 0 || + JLI_StrCmp(arg, "--version") == 0 || + JLI_StrCmp(arg, "-fullversion") == 0 || + JLI_StrCmp(arg, "--full-version") == 0; +} + +jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) { + char *env = getenv(var_name); + char *p, *arg; + char quote; + JLI_List argsInFile; + + if (firstAppArgIndex == 0) { + // Not 'java', return + return JNI_FALSE; + } + + if (relaunch) { + return JNI_FALSE; + } + + if (NULL == env) { + return JNI_FALSE; + } + + JLI_ReportMessage(ARG_INFO_ENVVAR, var_name, env); + + // This is retained until the process terminates as it is saved as the args + p = JLI_MemAlloc(JLI_StrLen(env) + 1); + while (*env != '\0') { + while (*env != '\0' && isspace(*env)) { + env++; + } + + arg = p; + while (*env != '\0' && !isspace(*env)) { + if (*env == '"' || *env == '\'') { + quote = *env++; + while (*env != quote && *env != '\0') { + *p++ = *env++; + } + + if (*env == '\0') { + JLI_ReportMessage(ARG_ERROR8, var_name); + exit(1); + } + env++; + } else { + *p++ = *env++; + } + } + + *p++ = '\0'; + + argsInFile = JLI_PreprocessArg(arg); + + if (NULL == argsInFile) { + if (isTerminalOpt(arg)) { + JLI_ReportMessage(ARG_ERROR9, arg, var_name); + exit(1); + } + JLI_List_add(args, arg); + } else { + size_t cnt, idx; + char *argFile = arg; + cnt = argsInFile->size; + for (idx = 0; idx < cnt; idx++) { + arg = argsInFile->elements[idx]; + if (isTerminalOpt(arg)) { + JLI_ReportMessage(ARG_ERROR10, arg, argFile, var_name); + exit(1); + } + JLI_List_add(args, arg); + } + // Shallow free, we reuse the string to avoid copy + JLI_MemFree(argsInFile->elements); + JLI_MemFree(argsInFile); + } + /* + * Check if main-class is specified after argument being checked. It + * must always appear after expansion, as a main-class could be specified + * indirectly into environment variable via an @argfile, and it must be + * caught now. + */ + if (firstAppArgIndex != NOT_FOUND) { + JLI_ReportMessage(ARG_ERROR11, var_name); + exit(1); + } + + assert (*env == '\0' || isspace(*env)); + } + + return JNI_TRUE; +} + #ifdef DEBUG_ARGFILE /* * Stand-alone sanity test, build with following command line diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/libjli/emessages.h --- a/jdk/src/java.base/share/native/libjli/emessages.h Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/libjli/emessages.h Mon Jan 30 12:04:11 2017 -0800 @@ -36,6 +36,7 @@ #define JNI_ERROR "Error: A JNI error has occurred, please check your installation and try again" #define JNI_ERROR1 "Error: can't find JNI interfaces in: %s" +#define ARG_INFO_ENVVAR "NOTE: Picked up the following options via %s:\n %s" #define ARG_WARN "Warning: %s option is no longer supported." #define ARG_ERROR1 "Error: %s requires class path specification" @@ -45,6 +46,10 @@ #define ARG_ERROR5 "Error: %s requires module id" #define ARG_ERROR6 "Error: %s requires modules to be specified" #define ARG_ERROR7 "Error: %s can only be specified once" +#define ARG_ERROR8 "Error: Unmatched quote in environment variable %s" +#define ARG_ERROR9 "Error: Option %s is not allowed in environment variable %s" +#define ARG_ERROR10 "Error: Option %s in %s is not allowed in environment variable %s" +#define ARG_ERROR11 "Error: Cannot specify main class in environment variable %s" #define JVM_ERROR1 "Error: Could not create the Java Virtual Machine.\n" GEN_ERROR #define JVM_ERROR2 "Error: Could not detach main thread.\n" JNI_ERROR diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/libjli/java.c --- a/jdk/src/java.base/share/native/libjli/java.c Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/libjli/java.c Mon Jan 30 12:04:11 2017 -0800 @@ -769,17 +769,7 @@ continue; } - if (*arg != '-' - || JLI_StrCmp(arg, "-version") == 0 - || JLI_StrCmp(arg, "--version") == 0 - || JLI_StrCmp(arg, "-fullversion") == 0 - || JLI_StrCmp(arg, "--full-version") == 0 - || JLI_StrCmp(arg, "-help") == 0 - || JLI_StrCmp(arg, "--help") == 0 - || JLI_StrCmp(arg, "-?") == 0 - || JLI_StrCmp(arg, "-jar") == 0 - || JLI_StrCmp(arg, "-X") == 0 - || JLI_StrCmp(arg, "--help-extra") == 0) { + if (*arg != '-' || isTerminalOpt(arg)) { return; } } @@ -1576,6 +1566,31 @@ return (*env)->CallStaticObjectMethod(env, cls, mid); } +static char* expandWildcardOnLongOpt(char* arg) { + char *p, *value; + size_t optLen, valueLen; + p = JLI_StrChr(arg, '='); + + if (p == NULL || p[1] == '\0') { + JLI_ReportErrorMessage(ARG_ERROR1, arg); + exit(1); + } + p++; + value = (char *) JLI_WildcardExpandClasspath(p); + if (p == value) { + // no wildcard + return arg; + } + + optLen = p - arg; + valueLen = JLI_StrLen(value); + p = JLI_MemAlloc(optLen + valueLen + 1); + memcpy(p, arg, optLen); + memcpy(p + optLen, value, valueLen); + p[optLen + valueLen + 1] = '\0'; + return p; +} + /* * For tools, convert command line args thus: * javac -cp foo:foo/"*" -J-ms32m ... @@ -1626,14 +1641,17 @@ if (arg[0] == '-') { if (arg[1] == 'J') continue; - if (IsWildCardEnabled() && arg[1] == 'c' - && (JLI_StrCmp(arg, "-cp") == 0 || - JLI_StrCmp(arg, "-classpath") == 0) - && i < argc - 1) { - *nargv++ = arg; - *nargv++ = (char *) JLI_WildcardExpandClasspath(argv[i+1]); - i++; - continue; + if (IsWildCardEnabled()) { + if (IsClassPathOption(arg) && i < argc - 1) { + *nargv++ = arg; + *nargv++ = (char *) JLI_WildcardExpandClasspath(argv[i+1]); + i++; + continue; + } + if (JLI_StrCCmp(arg, "--class-path=") == 0) { + *nargv++ = expandWildcardOnLongOpt(arg); + continue; + } } } *nargv++ = arg; diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/libjli/java.h --- a/jdk/src/java.base/share/native/libjli/java.h Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/libjli/java.h Mon Jan 30 12:04:11 2017 -0800 @@ -71,6 +71,7 @@ #define SPLASH_FILE_ENV_ENTRY "_JAVA_SPLASH_FILE" #define SPLASH_JAR_ENV_ENTRY "_JAVA_SPLASH_JAR" +#define JAVA_OPTIONS "JAVA_OPTIONS" /* * Pointers to the needed JNI invocation API, initialized by LoadJavaVM. @@ -169,6 +170,9 @@ void AddOption(char *str, void *info); jboolean IsWhiteSpaceOption(const char* name); +// Utility function defined in args.c +int isTerminalOpt(char *arg); + const char* GetProgramName(); const char* GetFullVersion(); jboolean IsJavaArgs(); diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/libjli/jli_util.h --- a/jdk/src/java.base/share/native/libjli/jli_util.h Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/libjli/jli_util.h Mon Jan 30 12:04:11 2017 -0800 @@ -135,5 +135,6 @@ void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile); JLI_List JLI_PreprocessArg(const char *arg); +jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name); #endif /* _JLI_UTIL_H */ diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/share/native/libjli/wildcard.c --- a/jdk/src/java.base/share/native/libjli/wildcard.c Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/share/native/libjli/wildcard.c Mon Jan 30 12:04:11 2017 -0800 @@ -272,14 +272,16 @@ (! exists(filename)); } -static void +static int FileList_expandWildcards(JLI_List fl) { size_t i, j; + int expandedCnt = 0; for (i = 0; i < fl->size; i++) { if (isWildcard(fl->elements[i])) { JLI_List expanded = wildcardFileList(fl->elements[i]); if (expanded != NULL && expanded->size > 0) { + expandedCnt++; JLI_MemFree(fl->elements[i]); JLI_List_ensureCapacity(fl, fl->size + expanded->size); for (j = fl->size - 1; j >= i+1; j--) @@ -294,19 +296,20 @@ JLI_List_free(expanded); } } + return expandedCnt; } const char * JLI_WildcardExpandClasspath(const char *classpath) { - char *expanded; + const char *expanded; JLI_List fl; if (JLI_StrChr(classpath, '*') == NULL) return classpath; fl = JLI_List_split(classpath, PATH_SEPARATOR); - FileList_expandWildcards(fl); - expanded = JLI_List_join(fl, PATH_SEPARATOR); + expanded = FileList_expandWildcards(fl) ? + JLI_List_join(fl, PATH_SEPARATOR) : classpath; JLI_List_free(fl); if (getenv(JLDEBUG_ENV_ENTRY) != 0) printf("Expanded wildcards:\n" diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/java.base/windows/native/libjli/cmdtoargs.c --- a/jdk/src/java.base/windows/native/libjli/cmdtoargs.c Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/java.base/windows/native/libjli/cmdtoargs.c Mon Jan 30 12:04:11 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, 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 @@ -31,6 +31,8 @@ * in the jdk regression tests. */ +#include + #ifndef IDE_STANDALONE #include "java.h" #include "jli_util.h" @@ -198,17 +200,50 @@ int nargs = 0; StdArg* argv = NULL; jboolean wildcard = JNI_FALSE; - char* src = cmdline; + char* src = cmdline, *arg = NULL; JLI_List argsInFile; + size_t i, cnt; + + JLI_List envArgs = JLI_List_new(1); + if (JLI_AddArgsFromEnvVar(envArgs, JAVA_OPTIONS)) { + // JLI_SetTraceLauncher is not called yet + // Show _JAVA_OPTIONS content along with JAVA_OPTIONS to aid diagnosis + if (getenv(JLDEBUG_ENV_ENTRY)) { + char *tmp = getenv("_JAVA_OPTIONS"); + if (NULL != tmp) { + JLI_ReportMessage(ARG_INFO_ENVVAR, "_JAVA_OPTIONS", tmp); + } + } + } + cnt = envArgs->size + 1; + argv = JLI_MemAlloc(cnt * sizeof(StdArg)); // allocate arg buffer with sufficient space to receive the largest arg - char* arg = JLI_StringDup(cmdline); + arg = JLI_StringDup(cmdline); + + src = next_arg(src, arg, &wildcard); + // first argument is the app name, do not preprocess and make sure remains first + argv[0].arg = JLI_StringDup(arg); + argv[0].has_wildcard = wildcard; + nargs++; - do { + for (i = 1; i < cnt; i++) { + argv[i].arg = envArgs->elements[i - 1]; + // wildcard is not supported in argfile + argv[i].has_wildcard = JNI_FALSE; + nargs++; + } + JLI_MemFree(envArgs->elements); + JLI_MemFree(envArgs); + + assert ((size_t) nargs == cnt); + *arg = '\0'; + + // iterate through rest of command line + while (src != NULL) { src = next_arg(src, arg, &wildcard); argsInFile = JLI_PreprocessArg(arg); if (argsInFile != NULL) { - size_t cnt, i; // resize to accommodate another Arg cnt = argsInFile->size; argv = (StdArg*) JLI_MemRealloc(argv, (nargs + cnt) * sizeof(StdArg)); @@ -230,7 +265,7 @@ nargs++; } *arg = '\0'; - } while (src != NULL); + } JLI_MemFree(arg); diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/jdk.internal.le/windows/native/lible/WindowsTerminal.cpp --- a/jdk/src/jdk.internal.le/windows/native/lible/WindowsTerminal.cpp Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/jdk.internal.le/windows/native/lible/WindowsTerminal.cpp Mon Jan 30 12:04:11 2017 -0800 @@ -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 @@ -77,7 +77,7 @@ INPUT_RECORD record; DWORD n; while (TRUE) { - if (ReadConsoleInput(hStdIn, &record, 1, &n) == 0) { + if (ReadConsoleInputW(hStdIn, &record, 1, &n) == 0) { return NULL; } if (record.EventType == KEY_EVENT) { @@ -97,7 +97,7 @@ JNIEXPORT jint JNICALL Java_jdk_internal_jline_WindowsTerminal_getConsoleOutputCodepage (JNIEnv *, jobject) { - return GetConsoleCP(); + return GetConsoleOutputCP(); } JNIEXPORT jint JNICALL Java_jdk_internal_jline_WindowsTerminal_getWindowsTerminalWidth diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java Mon Jan 30 12:04:11 2017 -0800 @@ -356,7 +356,7 @@ this.md = md; } else { if (!root.name().equals(md.name())) { - error(getMsg("error.versioned.info.name.notequal")); + error(getMsg("error.validator.info.name.notequal")); isValid = false; } if (!root.requires().equals(md.requires())) { @@ -365,10 +365,10 @@ if (rootRequires.contains(r)) continue; if (r.modifiers().contains(Requires.Modifier.TRANSITIVE)) { - error(getMsg("error.versioned.info.requires.transitive")); + error(getMsg("error.validator.info.requires.transitive")); isValid = false; } else if (!isPlatformModule(r.name())) { - error(getMsg("error.versioned.info.requires.added")); + error(getMsg("error.validator.info.requires.added")); isValid = false; } } @@ -377,21 +377,21 @@ if (mdRequires.contains(r)) continue; if (!isPlatformModule(r.name())) { - error(getMsg("error.versioned.info.requires.dropped")); + error(getMsg("error.validator.info.requires.dropped")); isValid = false; } } } if (!root.exports().equals(md.exports())) { - error(getMsg("error.versioned.info.exports.notequal")); + error(getMsg("error.validator.info.exports.notequal")); isValid = false; } if (!root.opens().equals(md.opens())) { - error(getMsg("error.versioned.info.opens.notequal")); + error(getMsg("error.validator.info.opens.notequal")); isValid = false; } if (!root.provides().equals(md.provides())) { - error(getMsg("error.versioned.info.provides.notequal")); + error(getMsg("error.validator.info.provides.notequal")); isValid = false; } if (!root.mainClass().equals(md.mainClass())) { diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ModuleSorter.java Mon Jan 30 12:04:11 2017 -0800 @@ -25,10 +25,12 @@ package jdk.tools.jlink.internal; import jdk.tools.jlink.plugin.PluginException; +import jdk.tools.jlink.plugin.ResourcePoolEntry; import jdk.tools.jlink.plugin.ResourcePoolModule; import jdk.tools.jlink.plugin.ResourcePoolModuleView; import java.lang.module.ModuleDescriptor; +import java.nio.ByteBuffer; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; @@ -53,10 +55,19 @@ moduleView.modules().forEach(this::addModule); } + private ModuleDescriptor readModuleDescriptor(ResourcePoolModule module) { + String p = "/" + module.name() + "/module-info.class"; + ResourcePoolEntry content = module.findEntry(p).orElseThrow(() -> + new PluginException("module-info.class not found for " + + module.name() + " module") + ); + ByteBuffer bb = ByteBuffer.wrap(content.contentBytes()); + return ModuleDescriptor.read(bb); + } + private ModuleSorter addModule(ResourcePoolModule module) { - ModuleDescriptor descriptor = module.descriptor(); addNode(module); - descriptor.requires().stream() + readModuleDescriptor(module).requires().stream() .forEach(req -> { String dm = req.name(); ResourcePoolModule dep = moduleView.findModule(dm) diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java Mon Jan 30 12:04:11 2017 -0800 @@ -194,8 +194,6 @@ private final class PluginsHelper { - private static final String PLUGINS_PATH = "--plugin-module-path"; - private Layer pluginsLayer = Layer.boot(); private final List plugins; private String lastSorter; @@ -503,22 +501,7 @@ } private String getPluginsPath(String[] args) throws BadArgs { - String pp = null; - for (int i = 0; i < args.length; i++) { - if (args[i].equals(PluginsHelper.PLUGINS_PATH)) { - if (i == args.length - 1) { - throw new BadArgs("err.no.plugins.path").showUsage(true); - } else { - i += 1; - pp = args[i]; - if (!pp.isEmpty() && pp.charAt(0) == '-') { - throw new BadArgs("err.no.plugins.path").showUsage(true); - } - break; - } - } - } - return pp; + return null; } // used by jimage. Return unhandled arguments like "create", "describe". @@ -542,31 +525,7 @@ // Must extract it prior to do any option analysis. // Required to interpret custom plugin options. // Unit tests can call Task multiple time in same JVM. - pluginOptions = new PluginsHelper(getPluginsPath(args)); - - // First extract plugins path if any - String pp = null; - List filteredArgs = new ArrayList<>(); - for (int i = 0; i < args.length; i++) { - if (args[i].equals(PluginsHelper.PLUGINS_PATH)) { - if (i == args.length - 1) { - throw new BadArgs("err.no.plugins.path").showUsage(true); - } else { - warning("warn.thirdparty.plugins.enabled"); - log.println(bundleHelper.getMessage("warn.thirdparty.plugins")); - i += 1; - String arg = args[i]; - if (!arg.isEmpty() && arg.charAt(0) == '-') { - throw new BadArgs("err.no.plugins.path").showUsage(true); - } - pp = args[i]; - } - } else { - filteredArgs.add(args[i]); - } - } - String[] arr = new String[filteredArgs.size()]; - args = filteredArgs.toArray(arr); + pluginOptions = new PluginsHelper(null); List rest = collectUnhandled? new ArrayList<>() : null; // process options diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java Mon Jan 30 12:04:11 2017 -0800 @@ -29,7 +29,11 @@ import java.io.IOException; import java.io.InputStream; import java.lang.module.ModuleDescriptor; -import java.lang.module.ModuleDescriptor.*; +import java.lang.module.ModuleDescriptor.Exports; +import java.lang.module.ModuleDescriptor.Opens; +import java.lang.module.ModuleDescriptor.Provides; +import java.lang.module.ModuleDescriptor.Requires; +import java.lang.module.ModuleDescriptor.Version; import java.util.ArrayList; import java.util.Collection; import java.util.EnumSet; @@ -41,8 +45,6 @@ import java.util.TreeSet; import java.util.function.IntSupplier; -import jdk.internal.misc.JavaLangModuleAccess; -import jdk.internal.misc.SharedSecrets; import jdk.internal.module.Checks; import jdk.internal.module.ModuleHashes; import jdk.internal.module.ModuleInfo.Attributes; @@ -55,6 +57,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; +import jdk.tools.jlink.internal.ModuleSorter; import jdk.tools.jlink.plugin.PluginException; import jdk.tools.jlink.plugin.ResourcePool; import jdk.tools.jlink.plugin.Plugin; @@ -63,7 +66,7 @@ /** * Jlink plugin to reconstitute module descriptors for system modules. - * It will extend module-info.class with Packages attribute, + * It will extend module-info.class with ModulePackages attribute, * if not present. It also determines the number of packages of * the boot layer at link time. * @@ -73,16 +76,15 @@ * @see SystemModules */ public final class SystemModulesPlugin implements Plugin { - private static final JavaLangModuleAccess JLMA = - SharedSecrets.getJavaLangModuleAccess(); - private static final String NAME = "system-modules"; private static final String DESCRIPTION = PluginsResourceBundle.getDescription(NAME); private boolean enabled; + private boolean retainModuleTarget; public SystemModulesPlugin() { this.enabled = true; + this.retainModuleTarget = false; } @Override @@ -102,9 +104,19 @@ } @Override + public boolean hasArguments() { + return true; + } + + @Override public void configure(Map config) { - if (config.containsKey(NAME)) { - enabled = false; + String arg = config.get(NAME); + if (arg != null) { + if (arg.equals("retainModuleTarget")) { + retainModuleTarget = true; + } else { + throw new IllegalArgumentException(NAME + ": " + arg); + } } } @@ -114,12 +126,15 @@ throw new PluginException(NAME + " was set"); } - SystemModulesClassGenerator generator = new SystemModulesClassGenerator(); + SystemModulesClassGenerator generator = + new SystemModulesClassGenerator(retainModuleTarget); // generate the byte code to create ModuleDescriptors - // skip parsing module-info.class and skip name check - in.moduleView().modules().forEach(module -> { + // such that the modules linked in the image would skip parsing + // of module-info.class and also skip name check + // Sort modules in the topological order so that java.base is always first. + new ModuleSorter(in.moduleView()).sorted().forEach(module -> { ResourcePoolEntry data = module.findEntry("module-info.class").orElseThrow( // automatic module not supported yet () -> new PluginException("module-info.class not found for " + @@ -128,19 +143,10 @@ assert module.name().equals(data.moduleName()); try { - ModuleInfo moduleInfo = new ModuleInfo(data.contentBytes(), module.packages()); - generator.addModule(moduleInfo); + // validate the module and add to system modules + data = generator.buildModuleInfo(data, module.packages()); - // link-time validation - moduleInfo.validateNames(); - // check if any exported or open package is not present - moduleInfo.validatePackages(); - - // Packages attribute needs update - if (moduleInfo.shouldAddPackagesAttribute()) { - // replace with the overridden version - data = data.copyWithContent(moduleInfo.getBytes()); - } + // add resource pool entry out.add(data); } catch (IOException e) { throw new PluginException(e); @@ -164,29 +170,55 @@ return out.build(); } - class ModuleInfo { - final ModuleDescriptor descriptor; - final ModuleHashes recordedHashes; - final ModuleResolution moduleResolution; - final Set packages; - final ByteArrayInputStream bain; + static class ModuleInfo { + private final Attributes attrs; + private final Set packages; + private final ByteArrayInputStream bain; + private final boolean dropModuleTarget; + private ModuleDescriptor descriptor; // may be different that the original one - ModuleInfo(byte[] bytes, Set packages) throws IOException { + ModuleInfo(byte[] bytes, Set packages, boolean dropModuleTarget) + throws IOException + { this.bain = new ByteArrayInputStream(bytes); this.packages = packages; - Attributes attrs = jdk.internal.module.ModuleInfo.read(bain, null); + this.attrs = jdk.internal.module.ModuleInfo.read(bain, null); this.descriptor = attrs.descriptor(); - this.recordedHashes = attrs.recordedHashes(); - this.moduleResolution = attrs.moduleResolution(); - if (descriptor.isAutomatic()) { throw new InternalError("linking automatic module is not supported"); } + + if (dropModuleTarget) { + // drop target attribute only if any OS property is present + this.dropModuleTarget = + descriptor.osName().isPresent() || + descriptor.osArch().isPresent() || + descriptor.osVersion().isPresent(); + } else { + this.dropModuleTarget = false; + } } String moduleName() { - return descriptor.name(); + return attrs.descriptor().name(); + } + + ModuleDescriptor descriptor() { + return descriptor; + } + + + Set packages() { + return packages; + } + + ModuleHashes recordedHashes() { + return attrs.recordedHashes(); + } + + ModuleResolution moduleResolution() { + return attrs.moduleResolution(); } /** @@ -217,6 +249,9 @@ for (String pn : descriptor.packages()) { Checks.requirePackageName(pn); } + for (String pn : packages) { + Checks.requirePackageName(pn); + } } @@ -242,22 +277,47 @@ } /** - * Returns true if the PackagesAttribute should be written + * Returns true if module-info.class should be written + * 1. add ModulePackages attribute if not present; or + * 2. drop ModuleTarget attribute except java.base */ - boolean shouldAddPackagesAttribute() { - return descriptor.packages().isEmpty() && packages.size() > 0; + boolean shouldRewrite() { + return shouldAddModulePackages() || shouldDropModuleTarget(); + } + + boolean shouldAddModulePackages() { + return (descriptor.packages().isEmpty() && packages.size() > 0); + } + + boolean shouldDropModuleTarget() { + return dropModuleTarget && + (descriptor.osName().isPresent() || + descriptor.osArch().isPresent() || + descriptor.osVersion().isPresent()); } /** - * Returns the bytes for the module-info.class with PackagesAttribute + * Returns the bytes for the module-info.class with ModulePackages * if it contains at least one package */ byte[] getBytes() throws IOException { bain.reset(); - // add Packages attribute if not exist - if (shouldAddPackagesAttribute()) { - return new ModuleInfoRewriter(bain, packages).getBytes(); + // add ModulePackages attribute if not exist + if (shouldRewrite()) { + ModuleInfoRewriter rewriter = new ModuleInfoRewriter(bain); + if (shouldAddModulePackages()) { + rewriter.addModulePackages(packages); + } + if (shouldDropModuleTarget()) { + rewriter.dropModuleTarget(); + } + // rewritten module descriptor + byte[] bytes = rewriter.getBytes(); + try (ByteArrayInputStream bain = new ByteArrayInputStream(bytes)) { + this.descriptor = ModuleDescriptor.read(bain); + } + return bytes; } else { return bain.readAllBytes(); } @@ -265,16 +325,23 @@ class ModuleInfoRewriter extends ByteArrayOutputStream { final ModuleInfoExtender extender; - ModuleInfoRewriter(InputStream in, Set packages) throws IOException { + ModuleInfoRewriter(InputStream in) { this.extender = ModuleInfoExtender.newExtender(in); - // Add Packages attribute - if (packages.size() > 0) { - this.extender.packages(packages); - } - this.extender.write(this); } - byte[] getBytes() { + void addModulePackages(Set packages) { + // Add ModulePackages attribute + if (packages.size() > 0) { + extender.packages(packages); + } + } + + void dropModuleTarget() { + extender.targetPlatform("", "", ""); + } + + byte[] getBytes() throws IOException { + extender.write(this); return buf; } } @@ -316,6 +383,7 @@ private int nextLocalVar = 2; // index to next local variable private final ClassWriter cw; + private boolean dropModuleTarget; // Method visitor for generating the SystemModules::modules() method private MethodVisitor mv; @@ -329,9 +397,10 @@ private final DedupSetBuilder dedupSetBuilder = new DedupSetBuilder(this::getNextLocalVar); - public SystemModulesClassGenerator() { + public SystemModulesClassGenerator(boolean retainModuleTarget) { this.cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES); + this.dropModuleTarget = !retainModuleTarget; } private int getNextLocalVar() { @@ -395,14 +464,52 @@ } /* - * Adds the given ModuleDescriptor to the system module list, and - * prepares mapping from various Sets to SetBuilders to emit an - * optimized number of sets during build. + * Adds the given ModuleDescriptor to the system module list. + * It performs link-time validation and prepares mapping from various + * Sets to SetBuilders to emit an optimized number of sets during build. */ - public void addModule(ModuleInfo moduleInfo) { - ModuleDescriptor md = moduleInfo.descriptor; + public ResourcePoolEntry buildModuleInfo(ResourcePoolEntry entry, + Set packages) + throws IOException + { + if (moduleInfos.isEmpty() && !entry.moduleName().equals("java.base")) { + throw new InternalError("java.base must be the first module to process"); + } + + ModuleInfo moduleInfo; + if (entry.moduleName().equals("java.base")) { + moduleInfo = new ModuleInfo(entry.contentBytes(), packages, false); + ModuleDescriptor md = moduleInfo.descriptor; + // drop Moduletarget attribute only if java.base has all OS properties + // otherwise, retain it + if (dropModuleTarget && + md.osName().isPresent() && md.osArch().isPresent() && + md.osVersion().isPresent()) { + dropModuleTarget = true; + } else { + dropModuleTarget = false; + } + } else { + moduleInfo = new ModuleInfo(entry.contentBytes(), packages, dropModuleTarget); + } + + // link-time validation + moduleInfo.validateNames(); + // check if any exported or open package is not present + moduleInfo.validatePackages(); + + // module-info.class may be overridden for optimization + // 1. update ModuleTarget attribute to drop osName, osArch, osVersion + // 2. add/update ModulePackages attribute + if (moduleInfo.shouldRewrite()) { + entry = entry.copyWithContent(moduleInfo.getBytes()); + } moduleInfos.add(moduleInfo); + dedups(moduleInfo.descriptor()); + return entry; + } + private void dedups(ModuleDescriptor md) { // exports for (Exports e : md.exports()) { dedupSetBuilder.stringSet(e.targets()); @@ -466,8 +573,8 @@ for (int index = 0; index < moduleInfos.size(); index++) { ModuleInfo minfo = moduleInfos.get(index); - new ModuleDescriptorBuilder(minfo.descriptor, - minfo.packages, + new ModuleDescriptorBuilder(minfo.descriptor(), + minfo.packages(), index).build(); } mv.visitVarInsn(ALOAD, MD_VAR); @@ -494,8 +601,8 @@ for (int index = 0; index < moduleInfos.size(); index++) { ModuleInfo minfo = moduleInfos.get(index); - if (minfo.recordedHashes != null) { - new ModuleHashesBuilder(minfo.recordedHashes, + if (minfo.recordedHashes() != null) { + new ModuleHashesBuilder(minfo.recordedHashes(), index, hmv).build(); } @@ -525,12 +632,12 @@ for (int index=0; index < moduleInfos.size(); index++) { ModuleInfo minfo = moduleInfos.get(index); - if (minfo.moduleResolution != null) { + if (minfo.moduleResolution() != null) { mresmv.visitVarInsn(ALOAD, 0); pushInt(mresmv, index); mresmv.visitTypeInsn(NEW, MODULE_RESOLUTION_CLASSNAME); mresmv.visitInsn(DUP); - mresmv.visitLdcInsn(minfo.moduleResolution.value()); + mresmv.visitLdcInsn(minfo.moduleResolution().value()); mresmv.visitMethodInsn(INVOKESPECIAL, MODULE_RESOLUTION_CLASSNAME, "", @@ -644,6 +751,11 @@ // main class md.mainClass().ifPresent(this::mainClass); + // os name, arch, version + targetPlatform(md.osName().orElse(null), + md.osArch().orElse(null), + md.osVersion().orElse(null)); + putModuleDescriptor(); } @@ -937,6 +1049,33 @@ "version", STRING_SIG, false); mv.visitInsn(POP); } + + /* + * Invoke Builder.osName(String name) + * Builder.osArch(String arch) + * Builder.osVersion(String version) + */ + void targetPlatform(String osName, String osArch, String osVersion) { + if (osName != null) { + invokeBuilderMethod("osName", osName); + } + + if (osArch != null) { + invokeBuilderMethod("osArch", osArch); + } + + if (osVersion != null) { + invokeBuilderMethod("osVersion", osVersion); + } + } + + void invokeBuilderMethod(String methodName, String value) { + mv.visitVarInsn(ALOAD, BUILDER_VAR); + mv.visitLdcInsn(value); + mv.visitMethodInsn(INVOKEVIRTUAL, MODULE_DESCRIPTOR_BUILDER, + methodName, STRING_SIG, false); + mv.visitInsn(POP); + } } class ModuleHashesBuilder { diff -r 31e01190e3c5 -r 362db50cabe6 jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties --- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties Mon Jan 30 12:04:11 2017 -0800 @@ -81,6 +81,8 @@ Takes a file hinting to jlink what java.lang.invoke classes to pre-generate. If\n\ this flag is not specified a default set of classes will be generated. +system-modules.argument=retainModuleTarget + system-modules.description=Fast loading of module descriptors (always enabled) onoff.argument= @@ -142,9 +144,6 @@ \ --resources-last-sorter The last plugin allowed to sort\n\ \ resources -plugin.opt.plugin-module-path=\ -\ --plugin-module-path Custom plugin module path - plugin.opt.disable-plugin=\ \ --disable-plugin Disable the plugin mentioned diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/ProblemList.txt --- a/jdk/test/ProblemList.txt Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/ProblemList.txt Mon Jan 30 12:04:11 2017 -0800 @@ -262,10 +262,6 @@ tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java 8169971 windows-x64 -tools/jlink/CustomPluginTest.java 8172864 generic-all - -tools/jar/multiRelease/ApiValidatorTest.java 8173396 generic-all - ############################################################################ # jdk_jdi diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/javax/net/ssl/FixingJavadocs/SSLSessionNulls.java --- a/jdk/test/javax/net/ssl/FixingJavadocs/SSLSessionNulls.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/javax/net/ssl/FixingJavadocs/SSLSessionNulls.java Mon Jan 30 12:04:11 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -27,6 +27,7 @@ * @summary Need to revisit the javadocs for JSSE, especially the * promoted classes. * @library /javax/net/ssl/templates + * @modules jdk.crypto.ec * @run main/othervm SSLSessionNulls * * SunJSSE does not support dynamic system properties, no way to re-use diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/javax/net/ssl/interop/ClientHelloChromeInterOp.java --- a/jdk/test/javax/net/ssl/interop/ClientHelloChromeInterOp.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/javax/net/ssl/interop/ClientHelloChromeInterOp.java Mon Jan 30 12:04:11 2017 -0800 @@ -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 @@ -30,7 +30,8 @@ * @test * @bug 8169362 * @summary Interop automated testing with Chrome - * @modules java.base/sun.security.util + * @modules jdk.crypto.ec + * java.base/sun.security.util * @run main/othervm ClientHelloChromeInterOp */ diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java --- a/jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/javax/net/ssl/templates/SSLSocketTemplate.java Mon Jan 30 12:04:11 2017 -0800 @@ -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 @@ -29,11 +29,22 @@ /* * @test * @bug 8161106 8170329 + * @modules jdk.crypto.ec * @summary Improve SSLSocket test template * @run main/othervm SSLSocketTemplate */ -import java.io.*; -import javax.net.ssl.*; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.IOException; +import java.io.OutputStream; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManagerFactory; import java.net.InetSocketAddress; import java.net.SocketTimeoutException; import java.security.KeyStore; @@ -41,7 +52,7 @@ import java.security.KeyFactory; import java.security.cert.Certificate; import java.security.cert.CertificateFactory; -import java.security.spec.*; +import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; import java.util.concurrent.CountDownLatch; diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jar/multiRelease/ApiValidatorTest.java --- a/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java Mon Jan 30 12:04:11 2017 -0800 @@ -31,7 +31,7 @@ * @build jdk.test.lib.JDKToolFinder jdk.test.lib.Utils jdk.test.lib.process.* * @build jdk.testlibrary.FileUtils * @build MRTestBase - * @run testng ApiValidatorTest + * @run testng/timeout=1200 ApiValidatorTest */ import jdk.test.lib.process.OutputAnalyzer; diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/CustomPluginTest.java --- a/jdk/test/tools/jlink/CustomPluginTest.java Mon Jan 30 16:32:46 2017 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -/* - * Copyright (c) 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. - * - * 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.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import tests.Helper; -import tests.JImageGenerator; -import tests.Result; - -/* - * @test - * @summary Test custom plugin - * @author Jean-Francois Denise - * @library ../lib - * @modules java.base/jdk.internal.jimage - * jdk.jdeps/com.sun.tools.classfile - * jdk.jlink/jdk.tools.jlink.internal - * jdk.jlink/jdk.tools.jmod - * jdk.jlink/jdk.tools.jimage - * jdk.compiler - * @build tests.* - * @run main/othervm CustomPluginTest - */ - -public class CustomPluginTest { - - public static void main(String[] args) throws Exception { - new CustomPluginTest().test(); - } - - private void test() throws Exception { - Helper helper = Helper.newHelper(); - if (helper == null) { - System.err.println("Test not run"); - return; - } - helper.generateDefaultModules(); - Path jmod = registerServices(helper); - Path pluginModulePath = jmod.getParent(); - - testHelloProvider(helper, pluginModulePath); - testCustomPlugins(helper, pluginModulePath); - testModuleVerification(helper, pluginModulePath); - } - - private void testCustomPlugins(Helper helper, Path pluginModulePath) { - Result result = JImageGenerator.getJLinkTask() - .option("--list-plugins") - .pluginModulePath(pluginModulePath) - .output(helper.createNewImageDir("customplugin")) - .call(); - if (result.getExitCode() != 0) { - System.err.println(result.getMessage()); - throw new AssertionError("jlink crashed: " + result.getExitCode()); - } - List customPlugins = Stream.of(result.getMessage().split("\n")) - .filter(s -> s.startsWith("Plugin Name:")) - .filter(s -> s.contains("custom")) - .collect(Collectors.toList()); - if (customPlugins.size() != 1) { - System.err.println(result.getMessage()); - throw new AssertionError("Found plugins: " + customPlugins); - } - } - - private Path registerServices(Helper helper) throws IOException { - String name = "customplugin"; - Path src = Paths.get(System.getProperty("test.src")).resolve(name); - Path classes = helper.getJmodClassesDir().resolve(name); - JImageGenerator.compile(src, classes); - return JImageGenerator.getJModTask() - .addClassPath(classes) - .jmod(helper.getJmodDir().resolve(name + ".jmod")) - .create().assertSuccess(); - } - - private void testHelloProvider(Helper helper, Path pluginModulePath) throws IOException { - Path pluginFile = Paths.get("customplugin.txt"); - if (Files.exists(pluginFile)) { - throw new AssertionError("Custom plugin output file already exists"); - } - String customplugin = "customplugin"; - { - // Add the path but not the option, plugin musn't be called - JImageGenerator.getJLinkTask() - .modulePath(helper.defaultModulePath()) - .pluginModulePath(pluginModulePath) - .output(helper.createNewImageDir(customplugin)) - .addMods(customplugin) - .call().assertSuccess(); - } - - if (Files.exists(pluginFile)) { - throw new AssertionError("Custom plugin output file exists, plugin " - + " called although shouldn't have been"); - } - - { // Add the path and the option, plugin should be called. - JImageGenerator.getJLinkTask() - .modulePath(helper.defaultModulePath()) - .addMods(customplugin) - .pluginModulePath(pluginModulePath) - .output(helper.createNewImageDir(customplugin)) - .option("--hello") - .call().assertSuccess(); - } - - if (!Files.exists(pluginFile)) { - throw new AssertionError("Custom plugin not called"); - } - } - - private void testModuleVerification(Helper helper, Path pluginModulePath) throws IOException { - { - // dependent module missing check - String moduleName = "bar"; // 8147491 - Path jmodFoo = helper.generateDefaultJModule("foo").assertSuccess(); - Path jmodBar = helper.generateDefaultJModule(moduleName, "foo").assertSuccess(); - // rogue filter removes "foo" module resources which are - // required by "bar" module. Module checks after plugin - // application should detect and report error. - JImageGenerator.getJLinkTask() - .modulePath(helper.defaultModulePath()) - .pluginModulePath(pluginModulePath) - .output(helper.createNewImageDir(moduleName)) - .addMods(moduleName) - .option("--disable-plugin") - .option("release-info") - .option("--rogue-filter") - .option("/foo/") - .call() - .assertFailure("foo not found"); - } - - { - // package exported by one module used as concealed package - // in another module. But, module-info.class is not updated! - String moduleName = "jdk.scripting.nashorn"; - JImageGenerator.getJLinkTask() - .modulePath(helper.defaultModulePath()) - .pluginModulePath(pluginModulePath) - .output(helper.createNewImageDir(moduleName)) - .addMods(moduleName) - // "java.logging" includes a package 'javax.script' - // which is an exported package from "java.scripting" module! - // module-info.class of java.logging left "as is". - .option("--rogue-adder") - .option("/java.logging/javax/script/Foo.class") - .call() - .assertFailure( - "Module java.logging's descriptor returns inconsistent package set"); - } - } -} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/JLink2Test.java --- a/jdk/test/tools/jlink/JLink2Test.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/jlink/JLink2Test.java Mon Jan 30 12:04:11 2017 -0800 @@ -68,58 +68,9 @@ // This test case must be first one, the JlinkTask is clean // and reveals possible bug related to plugin options in defaults testSameNames(helper); - testModulePath(helper); testOptions(); } - private static void testModulePath(Helper helper) throws IOException { - Path doesNotExist = helper.createNewImageDir("doesnotexist"); - Path jar = helper.getJarDir().resolve("bad.jar"); - JImageGenerator.getJLinkTask() - .pluginModulePath(doesNotExist) - .option("--help") - .call().assertSuccess(); - Files.createFile(jar); - JImageGenerator.getJLinkTask() - .pluginModulePath(jar) - .option("--help") - .call().assertFailure("(\n|\r|.)*Error: Invalid modules in the plugins path: (\n|\r|.)*"); - JImageGenerator.getJLinkTask() - .pluginModulePath(jar.getParent()) - .option("--help") - .call().assertFailure("Error: Invalid modules in the plugins path: .*zip file is empty(\n|\r|.)*"); - try (JarOutputStream out = new JarOutputStream(new FileOutputStream(jar.toFile()))) { - JarEntry entry = new JarEntry("class"); - out.putNextEntry(entry); - out.write("AAAA".getBytes()); - out.closeEntry(); - } - JImageGenerator.getJLinkTask() - .pluginModulePath(jar.getParent()) - .output(helper.createNewImageDir("crash")) - .addJmods(helper.getStdJmodsDir()) - .addJmods(jar.getParent()) - .addMods("bad") - .call().assertFailure("(\n|\r|.)*Error: module-info.class not found for bad module(\n|\r|.)*"); - try (JarOutputStream out = new JarOutputStream(new FileOutputStream(jar.toFile()))) { - JarEntry entry = new JarEntry("classes"); - out.putNextEntry(entry); - out.closeEntry(); - - entry = new JarEntry("classes/class"); - out.putNextEntry(entry); - out.write("AAAA".getBytes()); - out.closeEntry(); - } - JImageGenerator.getJLinkTask() - .pluginModulePath(jar.getParent()) - .output(helper.createNewImageDir("bad")) - .addJmods(jar.getParent()) - .addJars(helper.getStdJmodsDir()) - .addMods("bad") - .call().assertFailure("(\n|\r|.)*Error: module-info.class not found for bad module(\n|\r|.)*"); - } - private static void testSameNames(Helper helper) throws Exception { // Multiple modules with the same name in modulepath, take the first one in the path. // First jmods then jars. So jmods are found, jars are hidden. diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/customplugin/module-info.java --- a/jdk/test/tools/jlink/customplugin/module-info.java Mon Jan 30 16:32:46 2017 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - * Copyright (c) 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. - * - * 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 customplugin { - requires jdk.jlink; - provides jdk.tools.jlink.plugin.Plugin with plugin.HelloPlugin; - provides jdk.tools.jlink.plugin.Plugin with plugin.CustomPlugin; - provides jdk.tools.jlink.plugin.Plugin with plugin.RogueAdderPlugin; - provides jdk.tools.jlink.plugin.Plugin with plugin.RogueFilterPlugin; -} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/customplugin/plugin/CustomPlugin.java --- a/jdk/test/tools/jlink/customplugin/plugin/CustomPlugin.java Mon Jan 30 16:32:46 2017 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* - * Copyright (c) 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. - * - * 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 plugin; - -import java.util.Collections; -import java.util.Map; -import java.util.function.Function; -import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.ResourcePool; -import jdk.tools.jlink.plugin.ResourcePoolBuilder; -import jdk.tools.jlink.plugin.Plugin; - -public class CustomPlugin implements Plugin { - - private final static String NAME = "custom-plugin"; - - public CustomPlugin() { - } - - @Override - public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { - in.transformAndCopy(Function.identity(), out); - return out.build(); - } - - @Override - public String getName() { - return NAME; - } - - @Override - public String getDescription() { - return NAME + "-description"; - } - - @Override - public void configure(Map config) { - } - - @Override - public Category getType() { - return Category.PROCESSOR; - } -} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/customplugin/plugin/HelloPlugin.java --- a/jdk/test/tools/jlink/customplugin/plugin/HelloPlugin.java Mon Jan 30 16:32:46 2017 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* - * Copyright (c) 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. - * - * 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 plugin; - -import java.io.File; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.util.Collections; -import java.util.Map; -import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.ResourcePool; -import jdk.tools.jlink.plugin.ResourcePoolBuilder; -import jdk.tools.jlink.plugin.Plugin; - -/** - * Custom plugin - */ -public final class HelloPlugin implements Plugin { - - private static final String OUTPUT_FILE = "customplugin.txt"; - public static final String NAME = "hello"; - - public static boolean called; - - @Override - public String getName() { - return NAME; - } - - @Override - public ResourcePool transform(ResourcePool inResources, ResourcePoolBuilder outResources) { - try { - System.out.println("Hello!!!!!!!!!!"); - File f = new File(OUTPUT_FILE); - f.createNewFile(); - inResources.entries().forEach(res -> { - outResources.add(res); - }); - } catch (IOException ex) { - throw new UncheckedIOException(ex); - } - return outResources.build(); - } - - @Override - public String getDescription() { - return NAME + "-description"; - } -} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/customplugin/plugin/RogueAdderPlugin.java --- a/jdk/test/tools/jlink/customplugin/plugin/RogueAdderPlugin.java Mon Jan 30 16:32:46 2017 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * 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 plugin; - -import java.io.File; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.lang.module.ModuleDescriptor; -import java.util.Collections; -import java.util.Map; -import java.util.function.Function; -import jdk.tools.jlink.plugin.ResourcePool; -import jdk.tools.jlink.plugin.ResourcePoolBuilder; -import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.ResourcePoolModule; -import jdk.tools.jlink.plugin.Plugin; - -/** - * Rogue adder plugin - */ -public final class RogueAdderPlugin implements Plugin { - public static final String NAME = "rogue-adder"; - private String resName; - - @Override - public String getName() { - return NAME; - } - - @Override - public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { - in.transformAndCopy(Function.identity(), out); - out.add(ResourcePoolEntry.create(resName, new byte[1])); - return out.build(); - } - - @Override - public String getDescription() { - return NAME + "-description"; - } - - @Override - public Category getType() { - return Category.FILTER; - } - - @Override - public boolean hasArguments() { - return true; - } - - @Override - public void configure(Map config) { - resName = config.get(NAME); - } -} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/customplugin/plugin/RogueFilterPlugin.java --- a/jdk/test/tools/jlink/customplugin/plugin/RogueFilterPlugin.java Mon Jan 30 16:32:46 2017 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. - * 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 plugin; - -import java.io.File; -import java.io.IOException; -import java.io.UncheckedIOException; -import java.util.Collections; -import java.util.Map; -import jdk.tools.jlink.plugin.ResourcePoolEntry; -import jdk.tools.jlink.plugin.ResourcePool; -import jdk.tools.jlink.plugin.ResourcePoolBuilder; -import jdk.tools.jlink.plugin.Plugin; - -/** - * Rogue filter plugin - */ -public final class RogueFilterPlugin implements Plugin { - public static final String NAME = "rogue-filter"; - private String prefix; - - @Override - public String getName() { - return NAME; - } - - @Override - public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) { - in.transformAndCopy((file) -> { - return file.path().startsWith(prefix)? null : file; - }, out); - return out.build(); - } - - @Override - public String getDescription() { - return NAME + "-description"; - } - - @Override - public Category getType() { - return Category.FILTER; - } - - @Override - public boolean hasArguments() { - return true; - } - - @Override - public void configure(Map config) { - prefix = config.get(NAME); - } -} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java Mon Jan 30 12:04:11 2017 -0800 @@ -25,6 +25,9 @@ import java.lang.module.ModuleDescriptor.*; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.List; import java.util.Map; import java.util.Set; @@ -36,6 +39,7 @@ /** * @test + * @bug 8142968 8173381 * @modules java.base/jdk.internal.misc * @run testng SystemModulesTest * @summary Verify the properties of ModuleDescriptor created @@ -43,7 +47,72 @@ */ public class SystemModulesTest { - private static final JavaLangModuleAccess jlma = SharedSecrets.getJavaLangModuleAccess(); + private static final JavaLangModuleAccess JLMA = + SharedSecrets.getJavaLangModuleAccess(); + private static final String OS_NAME = System.getProperty("os.name"); + private static final String OS_ARCH = System.getProperty("os.arch"); + // system modules containing no package + private static final Set EMPTY_MODULES = + Set.of("java.se", "java.se.ee", "jdk.jdwp.agent", "jdk.pack"); + + @Test + public void testSystemModules() { + Path jimage = Paths.get(System.getProperty("java.home"), "lib", "modules"); + if (Files.notExists(jimage)) + return; + + ModuleFinder.ofSystem().findAll().stream() + .map(ModuleReference::descriptor) + .forEach(this::checkAttributes); + } + + // JMOD files are created with osName and osArch that may be different + // than os.name and os.arch system property + private boolean checkOSName(String name) { + if (name.equals(OS_NAME)) + return true; + + if (OS_NAME.equals("Mac OS X")) { + return name.equals("Darwin"); + } else if (OS_NAME.startsWith("Windows")) { + return name.startsWith("Windows"); + } else { + System.err.println("ERROR: " + name + " but expected: " + OS_NAME); + return false; + } + } + + private boolean checkOSArch(String name) { + if (name.equals(OS_ARCH)) + return true; + + switch (OS_ARCH) { + case "i386": + case "x86": + return name.equals("i586"); + default: + System.err.println("ERROR: " + name + " but expected: " + OS_ARCH); + return false; + } + } + + private void checkAttributes(ModuleDescriptor md) { + System.out.format("%s %s %s %s%n", md.name(), + md.osName(), md.osArch(), md.osVersion()); + + if (md.name().equals("java.base")) { + assertTrue(checkOSName(md.osName().get())); + assertTrue(checkOSArch(md.osArch().get())); + assertTrue(md.osVersion().isPresent()); + } else { + // target platform attribute is dropped by jlink plugin + assertFalse(md.osName().isPresent()); + assertFalse(md.osArch().isPresent()); + assertFalse(md.osVersion().isPresent()); + assertTrue(md.packages().size() > 0 + || EMPTY_MODULES.contains(md.name()), md.name()); + } + } /** * Verify ModuleDescriptor contains unmodifiable sets @@ -59,18 +128,19 @@ private void testModuleDescriptor(ModuleDescriptor md) { assertUnmodifiable(md.packages(), "package"); assertUnmodifiable(md.requires(), - jlma.newRequires(Set.of(Requires.Modifier.TRANSITIVE), "require", null)); + JLMA.newRequires(Set.of(Requires.Modifier.TRANSITIVE), + "require", null)); for (Requires req : md.requires()) { assertUnmodifiable(req.modifiers(), Requires.Modifier.TRANSITIVE); } - assertUnmodifiable(md.exports(), jlma.newExports(Set.of(), "export", Set.of())); + assertUnmodifiable(md.exports(), JLMA.newExports(Set.of(), "export", Set.of())); for (Exports exp : md.exports()) { assertUnmodifiable(exp.modifiers(), Exports.Modifier.SYNTHETIC); assertUnmodifiable(exp.targets(), "target"); } - assertUnmodifiable(md.opens(), jlma.newOpens(Set.of(), "open", Set.of())); + assertUnmodifiable(md.opens(), JLMA.newOpens(Set.of(), "open", Set.of())); for (Opens opens : md.opens()) { assertUnmodifiable(opens.modifiers(), Opens.Modifier.SYNTHETIC); assertUnmodifiable(opens.targets(), "target"); @@ -79,7 +149,7 @@ assertUnmodifiable(md.uses(), "use"); assertUnmodifiable(md.provides(), - jlma.newProvides("provide", List.of("provide"))); + JLMA.newProvides("provide", List.of("provide"))); for (Provides provides : md.provides()) { assertUnmodifiable(provides.providers(), "provide"); } diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java Mon Jan 30 12:04:11 2017 -0800 @@ -22,13 +22,20 @@ */ import java.io.File; +import java.io.IOException; +import java.lang.module.ModuleDescriptor; +import java.lang.reflect.Layer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; +import java.util.Set; +import java.util.spi.ToolProvider; import java.util.stream.Collectors; +import java.util.stream.Stream; import jdk.testlibrary.FileUtils; + import static jdk.testlibrary.ProcessTools.*; @@ -38,6 +45,7 @@ /** * @test + * @bug 8142968 8173381 * @library /lib/testlibrary * @modules jdk.compiler jdk.jlink * @build UserModuleTest CompilerUtils jdk.testlibrary.FileUtils jdk.testlibrary.ProcessTools @@ -50,8 +58,9 @@ private static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); private static final Path MODS_DIR = Paths.get("mods"); + private static final Path JMODS_DIR = Paths.get("jmods"); + private static final Path IMAGE = Paths.get("image"); - private static final Path JMODS = Paths.get(JAVA_HOME, "jmods"); private static final String MAIN_MID = "m1/p1.Main"; // the names of the modules in this test @@ -59,7 +68,7 @@ private static boolean hasJmods() { - if (!Files.exists(JMODS)) { + if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) { System.err.println("Test skipped. NO jmods directory"); return false; } @@ -75,25 +84,17 @@ for (String mn : modules) { Path msrc = SRC_DIR.resolve(mn); - assertTrue(CompilerUtils.compile(msrc, MODS_DIR, "--module-source-path", SRC_DIR.toString())); + assertTrue(CompilerUtils.compile(msrc, MODS_DIR, + "--module-source-path", SRC_DIR.toString())); } if (Files.exists(IMAGE)) { FileUtils.deleteFileTreeUnchecked(IMAGE); } - createImage(IMAGE, "java.base", "m1", "m3"); - } + createImage(IMAGE, "m1", "m3"); - private void createImage(Path outputDir, String... modules) throws Throwable { - Path jlink = Paths.get(JAVA_HOME, "bin", "jlink"); - String mp = JMODS.toString() + File.pathSeparator + MODS_DIR.toString(); - assertTrue(executeProcess(jlink.toString(), "--output", outputDir.toString(), - "--add-modules", Arrays.stream(modules).collect(Collectors.joining(",")), - "--module-path", mp) - .outputTo(System.out) - .errorTo(System.out) - .getExitValue() == 0); + createJmods("m1", "m4"); } /* @@ -120,9 +121,9 @@ Path java = IMAGE.resolve("bin").resolve("java"); assertTrue(executeProcess(java.toString(), "-m", "m3/p3.Main") - .outputTo(System.out) - .errorTo(System.out) - .getExitValue() == 0); + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); } /* @@ -150,12 +151,114 @@ public void testDedupSet() throws Throwable { if (!hasJmods()) return; - Path dir = Paths.get("newImage"); - createImage(dir, "java.base", "m1", "m2", "m3", "m4"); + Path dir = Paths.get("dedupSetTest"); + createImage(dir, "m1", "m2", "m3", "m4"); Path java = dir.resolve("bin").resolve("java"); assertTrue(executeProcess(java.toString(), "-m", MAIN_MID) .outputTo(System.out) .errorTo(System.out) .getExitValue() == 0); } + + private void createJmods(String... modules) throws IOException { + // use the same target platform as in java.base + ModuleDescriptor md = Layer.boot().findModule("java.base").get() + .getDescriptor(); + String osName = md.osName().get(); + String osArch = md.osArch().get(); + + // create JMOD files + Files.createDirectories(JMODS_DIR); + Stream.of(modules).forEach(mn -> + assertTrue(jmod("create", + "--class-path", MODS_DIR.resolve(mn).toString(), + "--os-name", osName, + "--os-arch", osArch, + "--main-class", mn.replace('m', 'p') + ".Main", + JMODS_DIR.resolve(mn + ".jmod").toString()) == 0) + ); + } + + + /** + * Verify the module descriptor if package p4.dummy is excluded at link time. + */ + @Test + public void testModulePackagesAttribute() throws Throwable { + if (!hasJmods()) return; + + // create an image using JMOD files + Path dir = Paths.get("packagesTest"); + String mp = Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator + JMODS_DIR.toString(); + + Set modules = Set.of("m1", "m4"); + assertTrue(JLINK_TOOL.run(System.out, System.out, + "--output", dir.toString(), + "--exclude-resources", "m4/p4/dummy/*", + "--add-modules", modules.stream().collect(Collectors.joining(",")), + "--module-path", mp) == 0); + + // verify ModuleDescriptor + Path java = dir.resolve("bin").resolve("java"); + assertTrue(executeProcess(java.toString(), + "--add-modules=m1", "-m", "m4") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + + /** + * Verify the plugin to retain ModuleTarget attribute + */ + @Test + public void testRetainModuleTarget() throws Throwable { + if (!hasJmods()) return; + + // create an image using JMOD files + Path dir = Paths.get("retainModuleTargetTest"); + String mp = Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator + JMODS_DIR.toString(); + + Set modules = Set.of("m1", "m4"); + assertTrue(JLINK_TOOL.run(System.out, System.out, + "--output", dir.toString(), + "--system-modules", "retainModuleTarget", + "--exclude-resources", "m4/p4/dummy/*", + "--add-modules", modules.stream().collect(Collectors.joining(",")), + "--module-path", mp) == 0); + + // verify ModuleDescriptor + Path java = dir.resolve("bin").resolve("java"); + assertTrue(executeProcess(java.toString(), + "--add-modules=m1", "-m", "m4", "retainModuleTarget") + .outputTo(System.out) + .errorTo(System.out) + .getExitValue() == 0); + } + + static final ToolProvider JLINK_TOOL = ToolProvider.findFirst("jlink") + .orElseThrow(() -> + new RuntimeException("jlink tool not found") + ); + + static final ToolProvider JMOD_TOOL = ToolProvider.findFirst("jmod") + .orElseThrow(() -> + new RuntimeException("jmod tool not found") + ); + + static final String MODULE_PATH = Paths.get(JAVA_HOME, "jmods").toString() + + File.pathSeparator + MODS_DIR.toString(); + + private void createImage(Path outputDir, String... modules) throws Throwable { + assertTrue(JLINK_TOOL.run(System.out, System.out, + "--output", outputDir.toString(), + "--add-modules", Arrays.stream(modules).collect(Collectors.joining(",")), + "--module-path", MODULE_PATH) == 0); + } + + private static int jmod(String... options) { + System.out.println("jmod " + Arrays.asList(options)); + return JMOD_TOOL.run(System.out, System.out, options); + } } diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java --- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java Mon Jan 30 12:04:11 2017 -0800 @@ -23,7 +23,10 @@ package p1; +import java.io.IOException; import java.lang.module.ModuleDescriptor; +import java.lang.reflect.Layer; +import java.lang.reflect.Module; import java.net.URI; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -37,25 +40,48 @@ // load another package p2.T.test(); - // check the module descriptor of a system module - validate(Main.class.getModule().getDescriptor()); + // validate the module descriptor + validate(Main.class.getModule()); + + // validate the Moduletarget attribute for java.base + ModuleDescriptor md = Layer.boot().findModule("java.base").get() + .getDescriptor(); + if (!md.osName().isPresent() || !md.osArch().isPresent() || + !md.osVersion().isPresent()) { + throw new RuntimeException("java.base: " + md.osName() + " " + + md.osArch() + " " + md.osVersion()); + } + } + + static void validate(Module module) throws IOException { + ModuleDescriptor md = module.getDescriptor(); // read m1/module-info.class FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), Collections.emptyMap()); - Path path = fs.getPath("/", "modules", "m1", "module-info.class"); - validate(ModuleDescriptor.read(Files.newInputStream(path))); - } + Path path = fs.getPath("/", "modules", module.getName(), "module-info.class"); + ModuleDescriptor md1 = ModuleDescriptor.read(Files.newInputStream(path)); + - static void validate(ModuleDescriptor md) { + // check the module descriptor of a system module and read from jimage checkPackages(md.packages(), "p1", "p2"); + checkPackages(md1.packages(), "p1", "p2"); + + // check ModuleTarget attribute + checkModuleTargetAttribute(md); + checkModuleTargetAttribute(md1); } static void checkPackages(Set pkgs, String... expected) { - for (String pn : expected) { - if (!pkgs.contains(pn)) { - throw new RuntimeException(pn + " missing in " + pkgs); - } + if (!pkgs.equals(Set.of(expected))) { + throw new RuntimeException(pkgs + " expected: " + Set.of(expected)); + } + } + + static void checkModuleTargetAttribute(ModuleDescriptor md) { + if (md.osName().isPresent() || md.osArch().isPresent() || + md.osVersion().isPresent()) { + throw new RuntimeException(md.osName() + " " + md.osArch() + " " + md.osVersion()); } } } diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java Mon Jan 30 12:04:11 2017 -0800 @@ -0,0 +1,114 @@ +/* + * 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 p4; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.module.ModuleDescriptor; +import java.lang.module.ModuleFinder; +import java.lang.reflect.Layer; +import java.net.URI; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Collections; +import java.util.Set; + +public class Main { + // the system module plugin by default drops ModuleTarget attribute + private static boolean expectModuleTarget = false; + public static void main(String... args) throws IOException { + if (args.length > 0) { + if (!args[0].equals("retainModuleTarget")) { + throw new IllegalArgumentException(args[0]); + } + + expectModuleTarget = true; + } + + // java.base is packaged with osName/osArch/osVersion + ModuleDescriptor md = Layer.boot().findModule("java.base").get() + .getDescriptor(); + if (!md.osName().isPresent() || + !md.osArch().isPresent() || + !md.osVersion().isPresent()) { + throw new RuntimeException("osName/osArch/osVersion is missing: " + + md.osName() + " " + md.osArch() + " " + md.osVersion()); + } + + // verify module-info.class for m1 and m4 + checkModule("m1", "p1", "p2"); + checkModule("m4", "p4"); + } + + private static void checkModule(String mn, String... packages) throws IOException { + // verify ModuleDescriptor from the runtime module + ModuleDescriptor md = Layer.boot().findModule(mn).get() + .getDescriptor(); + checkModuleDescriptor(md, packages); + + // verify ModuleDescriptor from module-info.class read from ModuleReader + try (InputStream in = ModuleFinder.ofSystem().find(mn).get() + .open().open("module-info.class").get()) { + checkModuleDescriptor(ModuleDescriptor.read(in), packages); + } + + // verify ModuleDescriptor from module-info.class read from jimage + FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), + Collections.emptyMap()); + Path path = fs.getPath("/", "modules", mn, "module-info.class"); + checkModuleDescriptor(ModuleDescriptor.read(Files.newInputStream(path)), packages); + } + + static void checkModuleDescriptor(ModuleDescriptor md, String... packages) { + String mainClass = md.name().replace('m', 'p') + ".Main"; + if (!md.mainClass().get().equals(mainClass)) { + throw new RuntimeException(md.mainClass().toString()); + } + + if (expectModuleTarget) { + // ModuleTarget attribute is retained + if (!md.osName().isPresent() || !md.osArch().isPresent()) { + throw new RuntimeException("osName or osArch is missing: " + + md.osName() + " " + md.osArch()); + } + } else { + // by default ModuleTarget attribute is dropped + if (md.osName().isPresent() || md.osArch().isPresent()) { + throw new RuntimeException("osName and osArch should not be set: " + + md.osName() + " " + md.osArch()); + } + } + + if (md.osVersion().isPresent()) { + throw new RuntimeException("Expected no osVersion set: " + md.osVersion()); + } + + Set pkgs = md.packages(); + if (!pkgs.equals(Set.of(packages))) { + throw new RuntimeException(pkgs + " expected: " + Set.of(packages)); + } + } +} diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/dummy/dummy.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/dummy/dummy.properties Mon Jan 30 12:04:11 2017 -0800 @@ -0,0 +1,1 @@ +key=dummy diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/launcher/ArgsEnvVar.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/tools/launcher/ArgsEnvVar.java Mon Jan 30 12:04:11 2017 -0800 @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * 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 8170832 + * @summary Arguments passed in environment variable + * @build TestHelper + * @run main ArgsEnvVar + */ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +public class ArgsEnvVar extends TestHelper { + private static File testJar = null; + private static Map env = new HashMap<>(); + + private static String JAVA_OPTIONS = "JAVA_OPTIONS"; + + static void init() throws IOException { + if (testJar != null) { + return; + } + testJar = new File("test.jar"); + StringBuilder tsrc = new StringBuilder(); + tsrc.append("public static void main(String... args) {\n"); + tsrc.append(" for (String x : args) {\n"); + tsrc.append(" System.out.println(x);\n"); + tsrc.append(" }\n"); + tsrc.append("}\n"); + createJar(testJar, new File("Foo"), tsrc.toString()); + + env.put(JLDEBUG_KEY, "true"); + } + + private File createArgFile(String fname, List lines) throws IOException { + File argFile = new File(fname); + argFile.delete(); + createAFile(argFile, lines); + return argFile; + } + + private void verifyOptions(List args, TestResult tr) { + if (args.isEmpty()) { + return; + } + + int i = 1; + for (String x : args) { + tr.matches(".*argv\\[" + i + "\\] = " + Pattern.quote(x) + ".*"); + i++; + } + if (! tr.testStatus) { + System.out.println(tr); + throw new RuntimeException("test fails"); + } + } + + private void verifyUserArgs(List args, TestResult tr, int index) { + if (javaCmd != TestHelper.javaCmd) { + tr.contains("\tFirst application arg index: 1"); + } else { + tr.contains("\tFirst application arg index: " + index); + + for (String arg: args) { + tr.matches("^" + Pattern.quote(arg) + "$"); + } + } + + if (! tr.testStatus) { + System.out.println(tr); + throw new RuntimeException("test fails"); + } + } + + @Test + // Verify prepend and @argfile expansion + public void basic() throws IOException { + File argFile1 = createArgFile("argFile1", List.of("-Xmx32m")); + File argFile2 = createArgFile("argFile2", List.of("-Darg.file2=TWO")); + File argFile3 = createArgFile("argFile3", List.of("-Darg.file3=THREE")); + + env.put(JAVA_OPTIONS, "@argFile1\n-Xint\r-cp @@escaped\t@argFile2"); + + TestResult tr = doExec(env, javaCmd, "@argFile3", "-cp", "test.jar", "Foo", "uarg1", "@uarg2"); + + List appArgs = new ArrayList<>(); + appArgs.add("uarg1"); + appArgs.add("@uarg2"); + + List options = new ArrayList<>(); + options.add("-Xmx32m"); + options.add("-Xint"); + options.add("-cp"); + options.add("@escaped"); + options.add("-Darg.file2=TWO"); + options.add("-Darg.file3=THREE"); + options.add("-cp"); + options.add("test.jar"); + options.add("Foo"); + options.addAll(appArgs); + + verifyOptions(options, tr); + verifyUserArgs(appArgs, tr, 10); + argFile1.delete(); + argFile2.delete(); + argFile3.delete(); + } + + private TestResult testInEnv(List options) { + env.put(JAVA_OPTIONS, String.join(" ", options)); + return doExec(env, javaCmd, "-jar", "test.jar"); + } + + private TestResult testInEnvAsArgFile(List options) throws IOException { + File argFile = createArgFile("argFile", options); + env.put(JAVA_OPTIONS, "@argFile"); + TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); + argFile.delete(); + return tr; + } + + @Test + public void noTerminalOpt() throws IOException { + List> terminal_opts = List.of( + List.of("-jar", "test.jar"), + List.of("-m", "test/Foo"), + List.of("--module", "test/Foo"), + List.of("--dry-run"), + List.of("-h"), + List.of("-?"), + List.of("-help"), + List.of("--help"), + List.of("-X"), + List.of("--help-extra"), + List.of("-version"), + List.of("--version"), + List.of("-fullversion"), + List.of("--full-version")); + + for (List options: terminal_opts) { + // terminal opt in environment variable + TestResult tr = testInEnv(options); + tr.checkNegative(); + if (!tr.testStatus) { + System.out.println(tr); + throw new RuntimeException("test fails"); + } + + // terminal opt in environment variable through @file + tr = testInEnvAsArgFile(options); + tr.checkNegative(); + if (!tr.testStatus) { + System.out.println(tr); + throw new RuntimeException("test fails"); + } + } + } + + @Test + public void quote() throws IOException { + File argFile1 = createArgFile("arg File 1", List.of("-Xint")); + File argFile2 = createArgFile("arg File 2", List.of("-Dprop='value with spaces'")); + File argFile3 = createArgFile("arg File 3", List.of("-Xmx32m")); + env.put(JAVA_OPTIONS, "'@arg File 1' @\"arg File 2\" @'arg File'\" 3\""); + + TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); + List options = new ArrayList<>(); + options.add("-Xint"); + options.add("-Dprop=value with spaces"); + options.add("-Xmx32m"); + options.add("-jar"); + options.add("test.jar"); + verifyOptions(options, tr); + argFile1.delete(); + argFile2.delete(); + argFile3.delete(); + } + + @Test + public void openQuoteShouldFail() { + env.put(JAVA_OPTIONS, "-Dprop='value missing close quote"); + TestResult tr = doExec(env, javaCmd, "-version"); + tr.checkNegative(); + if (!tr.testStatus) { + System.out.println(tr); + throw new RuntimeException("test fails"); + } + } + + @Test + public void noWildcard() { + env.put(JAVA_OPTIONS, "-cp *"); + TestResult tr = doExec(env, javaCmd, "-jar", "test.jar"); + verifyOptions(List.of("-cp", "*", "-jar", "test.jar"), tr); + + env.put(JAVA_OPTIONS, "-p ?"); + tr = doExec(env, javaCmd, "-jar", "test.jar", "one", "two"); + verifyOptions(List.of("-p", "?", "-jar", "test.jar", "one", "two"), tr); + } + + public static void main(String... args) throws Exception { + init(); + ArgsEnvVar a = new ArgsEnvVar(); + a.run(args); + if (testExitValue > 0) { + System.out.println("Total of " + testExitValue + " failed"); + System.exit(1); + } else { + System.out.println("All tests pass"); + } + } +} + diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/launcher/ArgsFileTest.java --- a/jdk/test/tools/launcher/ArgsFileTest.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/launcher/ArgsFileTest.java Mon Jan 30 12:04:11 2017 -0800 @@ -183,13 +183,13 @@ lines.add("uarg1 @uarg2 @@uarg3 -uarg4 uarg5"); File argFile2 = createArgFile("argFile2", lines); File argKill = createArgFile("argKill", - Collections.singletonList("-Xdisable-@files")); + Collections.singletonList("--disable-@files")); - TestResult tr = doExec(env, javaCmd, "@argFile1", "-Xdisable-@files", "@argFile2"); + TestResult tr = doExec(env, javaCmd, "@argFile1", "--disable-@files", "@argFile2"); List options = new ArrayList<>(); options.add("-Xmx32m"); options.add("-Xint"); - options.add("-Xdisable-@files"); + options.add("--disable-@files"); options.add("@argFile2"); verifyOptions(options, tr); // Main class is @argFile2 @@ -202,9 +202,9 @@ verifyUserArgs(Collections.emptyList(), tr, 5); // multiple is fine, once on is on. - tr = doExec(env, javaCmd, "@argKill", "@argFile1", "-Xdisable-@files", "@argFile2"); - options = Arrays.asList("-Xdisable-@files", "@argFile1", - "-Xdisable-@files", "@argFile2"); + tr = doExec(env, javaCmd, "@argKill", "@argFile1", "--disable-@files", "@argFile2"); + options = Arrays.asList("--disable-@files", "@argFile1", + "--disable-@files", "@argFile2"); verifyOptions(options, tr); verifyUserArgs(Collections.emptyList(), tr, 3); diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/launcher/ClassPathWildCard.sh --- a/jdk/test/tools/launcher/ClassPathWildCard.sh Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/launcher/ClassPathWildCard.sh Mon Jan 30 12:04:11 2017 -0800 @@ -125,7 +125,7 @@ CheckFail TestA rm -f TestB${OUTEXT} - $JAVA${variant} -classpath JarDir/"*"$NOOP TestB || exit 1 + $JAVA${variant} -cp JarDir/"*"$NOOP TestB || exit 1 CheckFail TestB @@ -134,11 +134,11 @@ cp TestD/*.class JarDir rm -f TestC${OUTEXT} - $JAVA${variant} -classpath JarDir${PATHSEP}JarDir/"*"$NOOP TestC || exit 1 + $JAVA${variant} --class-path JarDir${PATHSEP}JarDir/"*"$NOOP TestC || exit 1 CheckFail TestC rm -f TestD${OUTEXT} - $JAVA${variant} -classpath JarDir${PATHSEP}JarDir/"*"$NOOP TestD || exit 1 + $JAVA${variant} --class-path=JarDir${PATHSEP}JarDir/"*"$NOOP TestD || exit 1 CheckFail TestD } diff -r 31e01190e3c5 -r 362db50cabe6 jdk/test/tools/launcher/I18NArgTest.java --- a/jdk/test/tools/launcher/I18NArgTest.java Mon Jan 30 16:32:46 2017 +0530 +++ b/jdk/test/tools/launcher/I18NArgTest.java Mon Jan 30 12:04:11 2017 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,14 @@ /* * @test - * @bug 8016110 + * @bug 8016110 8170832 * @summary verify Japanese character in an argument are treated correctly * @compile -XDignore.symbol.file I18NArgTest.java * @run main I18NArgTest */ import java.io.IOException; +import java.util.Map; +import java.util.HashMap; public class I18NArgTest extends TestHelper { public static void main(String... args) throws IOException { @@ -80,6 +82,7 @@ execTest("*" + unicodeStr + "\u00b1" + unicodeStr + "*", hexValue + "b1"+ hexValue); execTest("?" + unicodeStr + "\u00b1" + unicodeStr + "?", hexValue + "b1"+ hexValue); } + static void execTest(String unicodeStr, String hexValue) { TestResult tr = doExec(javaCmd, "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath(), @@ -91,7 +94,22 @@ System.err.println(tr); throw new RuntimeException("test fails"); } + + // Test via JAVA_OPTIONS + Map env = new HashMap<>(); + String cmd = "-Dtest.src=" + TEST_SOURCES_DIR.getAbsolutePath() + + " -Dtest.classes=" + TEST_CLASSES_DIR.getAbsolutePath() + + " -cp " + TEST_CLASSES_DIR.getAbsolutePath() + + " I18NArgTest " + unicodeStr + " " + hexValue; + env.put("JAVA_OPTIONS", cmd); + tr = doExec(env, javaCmd); + System.out.println(tr.testOutput); + if (!tr.isOK()) { + System.err.println(tr); + throw new RuntimeException("test fails"); + } } + static void testCharacters(String... args) { String input = args[0]; String expected = args[1];