Merge
authorduke
Wed, 05 Jul 2017 23:36:51 +0200
changeset 45418 8d478df92153
parent 45417 f7479ee8de69 (current diff)
parent 45412 358c26742cc9 (diff)
child 45419 1e5f410302d2
Merge
jaxp/src/java.xml/share/classes/javax/xml/catalog/package.html
jaxp/src/java.xml/share/classes/javax/xml/datatype/package.html
jaxp/src/java.xml/share/classes/javax/xml/namespace/package.html
jaxp/src/java.xml/share/classes/javax/xml/parsers/package.html
jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package.html
jaxp/src/java.xml/share/classes/javax/xml/transform/package.html
jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package.html
jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html
jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package.html
jaxp/src/java.xml/share/classes/javax/xml/validation/package.html
jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html
jaxp/src/java.xml/share/classes/org/w3c/dom/package.html
jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html
jaxp/src/java.xml/share/classes/org/xml/sax/ext/package.html
jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package.html
jaxp/src/java.xml/share/classes/org/xml/sax/package.html
jdk/src/java.base/share/classes/overview-core.html
jdk/test/java/io/Serializable/class/NonSerialA_1.java
jdk/test/java/io/Serializable/class/NonSerialA_2.java
jdk/test/java/io/Serializable/class/SerialA.java
jdk/test/java/io/Serializable/class/SerialA_1.java
jdk/test/java/io/Serializable/class/SerialA_2.java
jdk/test/java/io/Serializable/class/SerialA_3.java
jdk/test/java/io/Serializable/class/Test.java
jdk/test/java/io/Serializable/class/run.sh
jdk/test/java/nio/channels/Selector/lots_of_updates.sh
jdk/test/java/nio/channels/SocketChannel/Open.sh
jdk/test/java/nio/file/Files/delete_on_close.sh
jdk/test/lib/testlibrary/CompilerUtils.java
jdk/test/sun/net/www/protocol/jar/B5105410.sh
jdk/test/sun/net/www/protocol/jar/copyin.sh
jdk/test/sun/net/www/protocol/jar/getcontenttype.sh
jdk/test/sun/net/www/protocol/jar/jarbug/run.sh
jdk/test/sun/net/www/protocol/jar/jarbug/src/test/RunAllTests.java
--- a/.hgtags-top-repo	Mon Jun 05 13:45:34 2017 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 23:36:51 2017 +0200
@@ -424,3 +424,5 @@
 df33ef1dc163f994177fd97d4d0e73a1e3cb5d85 jdk-10+8
 b94be69cbb1d2943b886bf2d458745756df146e4 jdk-10+9
 4c12464a907db4656c1033f56fa49cba643ac629 jdk-9+171
+6558c37afe832582238d338578d598f30c6fdd75 jdk-10+10
+2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172
--- a/corba/.hgtags	Mon Jun 05 13:45:34 2017 -0700
+++ b/corba/.hgtags	Wed Jul 05 23:36:51 2017 +0200
@@ -424,3 +424,5 @@
 648b0a00824eb29e71936bc3258d309a25e3b8c0 jdk-10+8
 54c6621f7b34cc6ce6c0882d047f61fe0962c257 jdk-10+9
 c62e5964cfcf144d8f72e9ba69757897785349a9 jdk-9+171
+080c37fd77e2c4629b91059298e37758afbdbc46 jdk-10+10
+95ed14547ca9246baed34f90ef3ca13217538a8c jdk-9+172
--- a/hotspot/.hgtags	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/.hgtags	Wed Jul 05 23:36:51 2017 +0200
@@ -584,3 +584,5 @@
 f5ded0cf954c770deeecb80f2ba1ba6a05cd979b jdk-10+8
 233647e3d3800e76d7612014b745b37a88098f63 jdk-10+9
 d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171
+c6cd3ec8d46b034e57c86399380ffcf7f25706e4 jdk-10+10
+1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
   private static AddressField  osThreadField;
   private static AddressField  stackBaseField;
   private static CIntegerField stackSizeField;
+  private static CIntegerField terminatedField;
 
   private static JavaThreadPDAccess access;
 
@@ -66,6 +67,9 @@
   private static int           BLOCKED;
   private static int           BLOCKED_TRANS;
 
+  private static int           NOT_TERMINATED;
+  private static int           EXITING;
+
   static {
     VM.registerVMInitializedObserver(new Observer() {
         public void update(Observable o, Object data) {
@@ -87,6 +91,7 @@
     osThreadField     = type.getAddressField("_osthread");
     stackBaseField    = type.getAddressField("_stack_base");
     stackSizeField    = type.getCIntegerField("_stack_size");
+    terminatedField   = type.getCIntegerField("_terminated");
 
     UNINITIALIZED     = db.lookupIntConstant("_thread_uninitialized").intValue();
     NEW               = db.lookupIntConstant("_thread_new").intValue();
@@ -99,6 +104,10 @@
     IN_JAVA_TRANS     = db.lookupIntConstant("_thread_in_Java_trans").intValue();
     BLOCKED           = db.lookupIntConstant("_thread_blocked").intValue();
     BLOCKED_TRANS     = db.lookupIntConstant("_thread_blocked_trans").intValue();
+
+    NOT_TERMINATED    = db.lookupIntConstant("JavaThread::_not_terminated").intValue();
+    EXITING           = db.lookupIntConstant("JavaThread::_thread_exiting").intValue();
+
   }
 
   public JavaThread(Address addr) {
@@ -128,6 +137,14 @@
       example, "SolarisSPARCCompilerThread".) */
   public boolean isJavaThread() { return true; }
 
+  public boolean isExiting () {
+      return (getTerminated() == EXITING) || isTerminated();
+  }
+
+  public boolean isTerminated() {
+      return (getTerminated() != NOT_TERMINATED) && (getTerminated() != EXITING);
+  }
+
   public static AddressField getAnchorField() { return anchorField; }
 
   /** Get the last Java stack pointer */
@@ -329,6 +346,10 @@
     return stackSizeField.getValue(addr);
   }
 
+  public int getTerminated() {
+      return (int) terminatedField.getValue(addr);
+  }
+
   /** Gets the Java-side thread object for this JavaThread */
   public Oop getThreadObj() {
     Oop obj = null;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/StackFrameInfo.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * 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 sun.jvm.hotspot.runtime;
+
+import sun.jvm.hotspot.oops.*;
+
+public class StackFrameInfo {
+    private Method      method;
+    int                 bci;
+    Oop                 classHolder;
+
+    public StackFrameInfo(JavaVFrame vf) {
+        this.method = vf.getMethod();
+        this.bci = vf.getBCI();
+    }
+
+    public Method getMethod() {
+        return method;
+    }
+
+    public int getBCI() {
+        return bci;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ThreadStackTrace.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,69 @@
+/*
+ * 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 sun.jvm.hotspot.runtime;
+
+import java.util.*;
+
+public class ThreadStackTrace {
+    private JavaThread                        thread;
+    private int                               depth;  // number of stack frames added
+    private ArrayList<StackFrameInfo>         frames;
+
+    public ThreadStackTrace(JavaThread t) {
+        this.thread = t;
+        this.depth = 0;
+        this.frames = new ArrayList<StackFrameInfo>();
+    }
+
+    public int getStackDepth() {
+        return depth;
+    }
+
+    public StackFrameInfo stackFrameAt(int index) {
+        return frames.get(index);
+    }
+
+    public void dumpStack(int maxDepth) {
+        if (!thread.isJavaThread()) {
+            System.out.println("dumpStack: not java Thread returning");
+            return;
+        }
+        try {
+            for (JavaVFrame vf = thread.getLastJavaVFrameDbg(); vf != null; vf = vf.javaSender()) {
+                StackFrameInfo frame = new StackFrameInfo(vf);
+                frames.add(frame);
+                depth++;
+
+                if (maxDepth > 0 && depth == maxDepth) {
+                    // Skip frames if more than maxDepth
+                    break;
+                }
+            }
+        } catch (Exception e) {
+            System.out.println("Error occurred during stack walking:");
+            e.printStackTrace();
+        }
+    }
+}
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java	Wed Jul 05 23:36:51 2017 +0200
@@ -379,6 +379,10 @@
     private static final long MAX_U4_VALUE = 0xFFFFFFFFL;
     int serialNum = 1;
 
+    public HeapHprofBinWriter() {
+        this.KlassMap = new ArrayList<Klass>();
+    }
+
     public synchronized void write(String fileName) throws IOException {
         // open file stream and create buffered data output stream
         fos = new FileOutputStream(fileName);
@@ -426,6 +430,9 @@
         // HPROF_LOAD_CLASS records for all classes
         writeClasses();
 
+        // write HPROF_FRAME and HPROF_TRACE records
+        dumpStackTraces();
+
         // write CLASS_DUMP records
         writeClassDumpRecords();
 
@@ -700,6 +707,67 @@
         }
     }
 
+    private void dumpStackTraces() throws IOException {
+        // write a HPROF_TRACE record without any frames to be referenced as object alloc sites
+        writeHeader(HPROF_TRACE, 3 * (int)INT_SIZE );
+        out.writeInt(DUMMY_STACK_TRACE_ID);
+        out.writeInt(0);                    // thread number
+        out.writeInt(0);                    // frame count
+
+        int frameSerialNum = 0;
+        int numThreads = 0;
+        Threads threads = VM.getVM().getThreads();
+
+        for (JavaThread thread = threads.first(); thread != null; thread = thread.next()) {
+            Oop threadObj = thread.getThreadObj();
+            if (threadObj != null && !thread.isExiting() && !thread.isHiddenFromExternalView()) {
+
+                // dump thread stack trace
+                ThreadStackTrace st = new ThreadStackTrace(thread);
+                st.dumpStack(-1);
+                numThreads++;
+
+                // write HPROF_FRAME records for this thread's stack trace
+                int depth = st.getStackDepth();
+                int threadFrameStart = frameSerialNum;
+                for (int j=0; j < depth; j++) {
+                    StackFrameInfo frame = st.stackFrameAt(j);
+                    Method m = frame.getMethod();
+                    int classSerialNum = KlassMap.indexOf(m.getMethodHolder()) + 1;
+                    // the class serial number starts from 1
+                    assert classSerialNum > 0:"class not found";
+                    dumpStackFrame(++frameSerialNum, classSerialNum, m, frame.getBCI());
+                }
+
+                // write HPROF_TRACE record for one thread
+                writeHeader(HPROF_TRACE, 3 * (int)INT_SIZE + depth * (int)VM.getVM().getOopSize());
+                int stackSerialNum = numThreads + DUMMY_STACK_TRACE_ID;
+                out.writeInt(stackSerialNum);      // stack trace serial number
+                out.writeInt(numThreads);          // thread serial number
+                out.writeInt(depth);               // frame count
+                for (int j=1; j <= depth; j++) {
+                    writeObjectID(threadFrameStart + j);
+                }
+            }
+        }
+    }
+
+    private void dumpStackFrame(int frameSN, int classSN, Method m, int bci) throws IOException {
+        int lineNumber;
+        if (m.isNative()) {
+            lineNumber = -3; // native frame
+        } else {
+            lineNumber = m.getLineNumberFromBCI(bci);
+        }
+        writeHeader(HPROF_FRAME, 4 * (int)VM.getVM().getOopSize() + 2 * (int)INT_SIZE);
+        writeObjectID(frameSN);                                  // frame serial number
+        writeSymbolID(m.getName());                              // method's name
+        writeSymbolID(m.getSignature());                         // method's signature
+        writeSymbolID(m.getMethodHolder().getSourceFileName());  // source file name
+        out.writeInt(classSN);                                   // class serial number
+        out.writeInt(lineNumber);                                // line number
+    }
+
     protected void writeJavaThread(JavaThread jt, int index) throws IOException {
         out.writeByte((byte) HPROF_GC_ROOT_THREAD_OBJ);
         writeObjectID(jt.getThreadObj());
@@ -1030,6 +1098,7 @@
                         writeHeader(HPROF_LOAD_CLASS, 2 * (OBJ_ID_SIZE + 4));
                         out.writeInt(serialNum);
                         writeObjectID(clazz);
+                        KlassMap.add(serialNum - 1, k);
                         out.writeInt(DUMMY_STACK_TRACE_ID);
                         writeSymbolID(k.getName());
                         serialNum++;
@@ -1045,6 +1114,7 @@
                         writeHeader(HPROF_LOAD_CLASS, 2 * (OBJ_ID_SIZE + 4));
                         out.writeInt(serialNum);
                         writeObjectID(clazz);
+                        KlassMap.add(serialNum - 1, k);
                         out.writeInt(DUMMY_STACK_TRACE_ID);
                         writeSymbolID(k.getName());
                         serialNum++;
@@ -1157,6 +1227,7 @@
     private Debugger dbg;
     private ObjectHeap objectHeap;
     private SymbolTable symTbl;
+    private ArrayList<Klass> KlassMap;
 
     // oopSize of the debuggee
     private int OBJ_ID_SIZE;
--- a/hotspot/src/share/vm/code/relocInfo.cpp	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/src/share/vm/code/relocInfo.cpp	Wed Jul 05 23:36:51 2017 +0200
@@ -129,9 +129,9 @@
   if (nm == NULL && begin != NULL) {
     // allow nmethod to be deduced from beginning address
     CodeBlob* cb = CodeCache::find_blob(begin);
-    nm = cb->as_compiled_method_or_null();
+    nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
   }
-  assert(nm != NULL, "must be able to deduce nmethod from other arguments");
+  guarantee(nm != NULL, "must be able to deduce nmethod from other arguments");
 
   _code    = nm;
   _current = nm->relocation_begin() - 1;
--- a/hotspot/src/share/vm/compiler/oopMap.cpp	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp	Wed Jul 05 23:36:51 2017 +0200
@@ -350,16 +350,14 @@
         omv = oms.current();
         oop* loc = fr->oopmapreg_to_location(omv.reg(),reg_map);
         guarantee(loc != NULL, "missing saved register");
+        oop *derived_loc = loc;
         oop *base_loc    = fr->oopmapreg_to_location(omv.content_reg(), reg_map);
-        oop *derived_loc = loc;
-        oop val = *base_loc;
-        if (val == (oop)NULL || Universe::is_narrow_oop_base(val)) {
-          // Ignore NULL oops and decoded NULL narrow oops which
-          // equal to Universe::narrow_oop_base when a narrow oop
-          // implicit null check is used in compiled code.
-          // The narrow_oop_base could be NULL or be the address
-          // of the page below heap depending on compressed oops mode.
-        } else {
+        // Ignore NULL oops and decoded NULL narrow oops which
+        // equal to Universe::narrow_oop_base when a narrow oop
+        // implicit null check is used in compiled code.
+        // The narrow_oop_base could be NULL or be the address
+        // of the page below heap depending on compressed oops mode.
+        if (base_loc != NULL && *base_loc != (oop)NULL && !Universe::is_narrow_oop_base(*base_loc)) {
           derived_oop_fn(base_loc, derived_loc);
         }
         oms.next();
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Wed Jul 05 23:36:51 2017 +0200
@@ -549,7 +549,7 @@
   CodeBlob *cb = CodeCache::find_blob(pc);
 
   // Should be an nmethod
-  assert(cb && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod");
+  guarantee(cb != NULL && cb->is_compiled(), "safepoint polling: pc must refer to an nmethod");
 
   // Look up the relocation information
   assert(((CompiledMethod*)cb)->is_at_poll_or_poll_return(pc),
@@ -1802,7 +1802,7 @@
   if (destination != entry_point) {
     CodeBlob* callee = CodeCache::find_blob(destination);
     // callee == cb seems weird. It means calling interpreter thru stub.
-    if (callee == cb || callee->is_adapter_blob()) {
+    if (callee != NULL && (callee == cb || callee->is_adapter_blob())) {
       // static call or optimized virtual
       if (TraceCallFixup) {
         tty->print("fixup callsite           at " INTPTR_FORMAT " to compiled code for", p2i(caller_pc));
@@ -1851,7 +1851,7 @@
   // ask me how I know this...
 
   CodeBlob* cb = CodeCache::find_blob(caller_pc);
-  if (!cb->is_compiled() || entry_point == moop->get_c2i_entry()) {
+  if (cb == NULL || !cb->is_compiled() || entry_point == moop->get_c2i_entry()) {
     return;
   }
 
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Mon Jun 05 13:45:34 2017 -0700
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -971,6 +971,7 @@
   nonstatic_field(JavaThread,                  _vframe_array_last,                            vframeArray*)                          \
   nonstatic_field(JavaThread,                  _satb_mark_queue,                              SATBMarkQueue)                         \
   nonstatic_field(JavaThread,                  _dirty_card_queue,                             DirtyCardQueue)                        \
+  volatile_nonstatic_field(JavaThread,         _terminated,                                   JavaThread::TerminatedTypes)           \
   nonstatic_field(Thread,                      _resource_area,                                ResourceArea*)                         \
   nonstatic_field(CompilerThread,              _env,                                          ciEnv*)                                \
                                                                                                                                      \
@@ -2213,6 +2214,7 @@
   declare_toplevel_type(JavaThread*)                                      \
   declare_toplevel_type(java_lang_Class)                                  \
   declare_integer_type(JavaThread::AsyncRequests)                         \
+  declare_integer_type(JavaThread::TerminatedTypes)                       \
   declare_toplevel_type(jbyte*)                                           \
   declare_toplevel_type(jbyte**)                                          \
   declare_toplevel_type(jint*)                                            \
@@ -2435,6 +2437,8 @@
   declare_constant(_thread_in_Java_trans)                                 \
   declare_constant(_thread_blocked)                                       \
   declare_constant(_thread_blocked_trans)                                 \
+  declare_constant(JavaThread::_not_terminated)                           \
+  declare_constant(JavaThread::_thread_exiting)                           \
                                                                           \
   /******************************/                                        \
   /* Klass misc. enum constants */                                        \
--- a/jaxp/.hgtags	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/.hgtags	Wed Jul 05 23:36:51 2017 +0200
@@ -424,3 +424,5 @@
 856998840907b67b7e1fc49259f785ac085a189b jdk-10+8
 3c75f07b2a49cb0a4f4eb5df8bbcbc64dda3153f jdk-10+9
 c27321c889cf4c8e465a61b84572c00ef7ee6004 jdk-9+171
+bd4b2c8835f35760a51c1475b03a16cc20c62973 jdk-10+10
+eedb6e54c8bd6197ecba5fc0d8568bac8ae852dd jdk-9+172
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1015,7 +1015,7 @@
      "\uC2DC\uC2A4\uD15C \uC18D\uC131 org.xml.sax.parser\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
 
     { ER_PARSER_ARG_CANNOT_BE_NULL,
-     "\uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
+     "\uAD6C\uBB38\uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
 
     { ER_FEATURE,
      "\uAE30\uB2A5: {0}"},
@@ -1252,7 +1252,7 @@
       "\uD2B9\uC218 \uCDA9\uB3CC\uC774 \uBC1C\uACAC\uB428: {0}. \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uC11C \uBC1C\uACAC\uB41C \uB9C8\uC9C0\uB9C9 \uD56D\uBAA9\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."},
 
     { WG_PARSING_AND_PREPARING,
-      "========= \uAD6C\uBB38 \uBD84\uC11D \uD6C4 {0} \uC900\uBE44 \uC911 =========="},
+      "========= \uAD6C\uBB38\uBD84\uC11D \uD6C4 {0} \uC900\uBE44 \uC911 =========="},
 
     { WG_ATTR_TEMPLATE,
      "\uC18D\uC131 \uD15C\uD50C\uB9AC\uD2B8, {0}"},
@@ -1357,7 +1357,7 @@
   { "optionOUT",  "   [-OUT outputFileName]"},
   { "optionLXCIN", "   [-LXCIN compiledStylesheetFileNameIn]"},
   { "optionLXCOUT", "   [-LXCOUT compiledStylesheetFileNameOutOut]"},
-  { "optionPARSER", "   [-PARSER \uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"},
+  { "optionPARSER", "   [-PARSER \uAD6C\uBB38\uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"},
   {  "optionE", "   [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"},
   {  "optionV",  "   [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"},
   {  "optionQC", "   [-QC(\uC790\uB3D9 \uD328\uD134 \uCDA9\uB3CC \uACBD\uACE0)]"},
@@ -1378,9 +1378,9 @@
   {  "optionHTML", "   [-HTML(HTML \uD3EC\uB9F7\uD130 \uC0AC\uC6A9)]"},
   {  "optionPARAM", "   [-PARAM \uC774\uB984 \uD45C\uD604\uC2DD(\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB9E4\uAC1C\uBCC0\uC218 \uC124\uC815)]"},
   {  "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
-  {  "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
+  {  "noParsermsg2", "** \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
   { "noParsermsg3",  "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
-  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
+  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
   { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
   { "optionURIRESOLVER", "   [-URIRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(URI \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 URIResolver)]"},
   { "optionENTITYRESOLVER",  "   [-ENTITYRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(\uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 EntityResolver)]"},
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java	Wed Jul 05 23:36:51 2017 +0200
@@ -482,7 +482,7 @@
   {"ER0000" , "{0}" },
 
     { ER_NO_CURLYBRACE,
-      "Fel: Uttryck kan inte inneh\u00E5lla '{'"},
+      "Fel: Uttryck f\u00E5r inte inneh\u00E5lla '{'"},
 
     { ER_ILLEGAL_ATTRIBUTE ,
      "{0} har ett otill\u00E5tet attribut: {1}"},
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMessages_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -417,7 +417,7 @@
          * XSLTC to process the XML input document had a configuration problem.
          */
         {ErrorMsg.SAX_PARSER_CONFIG_ERR,
-        "JAXP \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
+        "JAXP \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  The substitution text names the internal error
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/ErrorMessages_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -210,7 +210,7 @@
          * DTD.
          */
         {BasisLibrary.PARSER_DTD_SUPPORT_ERR,
-        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 DTD \uC120\uC5B8 \uC774\uBCA4\uD2B8\uB97C \uCC98\uB9AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  The following message indicates that the XML
@@ -219,7 +219,7 @@
          * declarations.
          */
         {BasisLibrary.NAMESPACES_SUPPORT_ERR,
-        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+        "\uC0AC\uC6A9 \uC911\uC778 SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 XML \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
 
         /*
          * Note to translators:  The substitution text is the URI that was in
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/SAXMessages_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -49,11 +49,11 @@
 property-not-supported = ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 property-not-recognized = ''{0}'' \uC18D\uC131\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 property-read-only = ''{0}'' \uC18D\uC131\uC740 \uC77D\uAE30 \uC804\uC6A9\uC785\uB2C8\uB2E4.
-property-not-parsing-supported = \uAD6C\uBB38 \uBD84\uC11D \uC911 ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+property-not-parsing-supported = \uAD6C\uBB38\uBD84\uC11D \uC911 ''{0}'' \uC18D\uC131\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 dom-node-read-not-supported = DOM \uB178\uB4DC \uC18D\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. DOM \uD2B8\uB9AC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 incompatible-class = ''{0}'' \uC18D\uC131\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uAC12\uC758 \uB370\uC774\uD130\uD615\uC744 {1}(\uC73C)\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 
 start-document-not-called="{0}" \uC18D\uC131\uC740 startDocument \uC774\uBCA4\uD2B8\uAC00 \uBC1C\uC0DD\uB41C \uD6C4 \uD638\uCD9C\uD574\uC57C \uD569\uB2C8\uB2E4.
 nullparameter="{0}"\uC5D0 \uB300\uD55C \uC774\uB984 \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
-errorHandlerNotSet=\uACBD\uACE0: \uAC80\uC99D\uC774 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC org.xml.sax.ErrorHandler\uAC00 \uC801\uC808\uD788 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uAE30\uBCF8 ErrorHandler\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCC98\uC74C {0}\uAC1C\uC758 \uC624\uB958\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4. \uC774 \uC624\uB958\uB97C \uC218\uC815\uD558\uB824\uBA74 ''setErrorHandler'' \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD558\uC2ED\uC2DC\uC624.
+errorHandlerNotSet=\uACBD\uACE0: \uAC80\uC99D\uC774 \uC124\uC815\uB418\uC5C8\uC9C0\uB9CC org.xml.sax.ErrorHandler\uAC00 \uC801\uC808\uD788 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uAE30\uBCF8 ErrorHandler\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCC98\uC74C {0}\uAC1C\uC758 \uC624\uB958\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4. \uC774 \uC624\uB958\uB97C \uC218\uC815\uD558\uB824\uBA74 ''setErrorHandler'' \uBA54\uC18C\uB4DC\uB97C \uD638\uCD9C\uD558\uC2ED\uC2DC\uC624.
 errorHandlerDebugMsg=\uC624\uB958: URI = "{0}", \uD589 = "{1}", : {2} 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XIncludeMessages_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 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
@@ -58,4 +58,4 @@
 
 # Messages from erroneous set-up
 IncompatibleNamespaceContext = Typ av NamespaceContext \u00E4r inkompatibel med XInclude; det kr\u00E4vs en instans av XIncludeNamespaceSupport
-ExpandedSystemId = Kunde inte ut\u00F6ka system-ID:t f\u00F6r inkluderad resurs
+ExpandedSystemId = Kunde inte ut\u00F6ka system-id:t f\u00F6r inkluderad resurs
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -295,7 +295,7 @@
 
 
 # Implementation limits
-        EntityExpansionLimit=JAXP00010001: \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
+        EntityExpansionLimit=JAXP00010001: \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC774 \uBB38\uC11C\uC5D0\uC11C "{0}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. \uC774\uB294 JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
         ElementAttributeLimit=JAXP00010002:  "{0}" \uC694\uC18C\uC5D0 "{1}"\uAC1C\uB97C \uCD08\uACFC\uD558\uB294 \uC18D\uC131\uC774 \uC788\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) JDK\uC5D0\uC11C \uC801\uC6A9\uD558\uB294 \uC81C\uD55C\uC785\uB2C8\uB2E4.
         MaxEntitySizeLimit=JAXP00010003: "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uAE38\uC774\uAC00 "{3}"\uC5D0\uC11C \uC124\uC815\uB41C "{2}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{1}"\uC785\uB2C8\uB2E4.
         TotalEntitySizeLimit=JAXP00010004: \uC5D4\uD2F0\uD2F0\uC758 \uB204\uC801 \uD06C\uAE30\uAC00 "{2}"\uC5D0\uC11C \uC124\uC815\uD55C "{1}" \uC81C\uD55C\uC744 \uCD08\uACFC\uD558\uB294 "{0}"\uC785\uB2C8\uB2E4.
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -312,7 +312,7 @@
         FacetValueFromBase = FacetValueFromBase: ''{0}'' \uC720\uD615\uC758 \uC120\uC5B8\uC5D0\uC11C ''{2}'' \uBA74\uC758 ''{1}'' \uAC12\uC740 \uAE30\uBCF8 \uC720\uD615 ''{3}''\uC758 \uAC12 \uACF5\uBC31\uC5D0\uC11C \uC640\uC57C \uD569\uB2C8\uB2E4.
         FixedFacetValue = FixedFacetValue: {3}\uC758 \uC815\uC758\uC5D0\uC11C ''{0}'' \uBA74\uC5D0 \uB300\uD55C ''{1}'' \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. ''{0}''\uC5D0 \uB300\uD55C \uAC12\uC774 \uC870\uC0C1 \uC720\uD615 \uC911 \uD558\uB098\uC5D0\uC11C ''{2}''(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC73C\uBA70 '{'fixed'}' = true\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.
         InvalidRegex = InvalidRegex: \uD328\uD134 \uAC12 ''{0}''\uC740(\uB294) \uC801\uD569\uD55C \uC815\uADDC \uD45C\uD604\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4. ''{2}'' \uC5F4\uC5D0\uC11C ''{1}'' \uC624\uB958\uAC00 \uBCF4\uACE0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-        MaxOccurLimit = \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC758 \uD604\uC7AC \uAD6C\uC131\uC5D0\uC11C maxOccurs \uC18D\uC131\uAC12\uC744 {0} \uAC12\uBCF4\uB2E4 \uD06C\uAC8C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+        MaxOccurLimit = \uAD6C\uBB38\uBD84\uC11D\uAE30\uC758 \uD604\uC7AC \uAD6C\uC131\uC5D0\uC11C maxOccurs \uC18D\uC131\uAC12\uC744 {0} \uAC12\uBCF4\uB2E4 \uD06C\uAC8C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
         PublicSystemOnNotation = PublicSystemOnNotation: \uD558\uB098 \uC774\uC0C1\uC758 ''public''\uACFC ''system''\uC774 ''notation'' \uC694\uC18C\uC5D0 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
         SchemaLocation = SchemaLocation: schemaLocation \uAC12 = ''{0}''\uC5D0\uB294 \uC9DD\uC218 \uAC1C\uC758 URI\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.
         TargetNamespace.1 = TargetNamespace.1: ''{0}'' \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uC2A4\uD0A4\uB9C8 \uBB38\uC11C\uC758 \uB300\uC0C1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 ''{1}''\uC785\uB2C8\uB2E4.
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -109,7 +109,7 @@
         cvc-totalDigits-valid = cvc-totalDigits-valid: V\u00E4rdet ''{0}'' har {1} siffror, men det totala antalet siffror \u00E4r begr\u00E4nsat till {2}.
         cvc-type.1 = cvc-type.1: Typdefinitionen ''{0}'' hittades inte.
         cvc-type.2 = cvc-type.2: Typdefinitionen kan inte vara abstrakt f\u00F6r elementet {0}.
-        cvc-type.3.1.1 = cvc-type.3.1.1: Elementet ''{0}'' har enkel typ och kan inte inneh\u00E5lla attribut, ut\u00F6ver s\u00E5dana vars namnrymd \u00E4r identisk med ''http://www.w3.org/2001/XMLSchema-instance'' och vars [lokala namn] har n\u00E5gotdera av ''type'', ''nil'', ''schemaLocation'' eller ''noNamespaceSchemaLocation''. Hittade dock attributet ''{1}''.
+        cvc-type.3.1.1 = cvc-type.3.1.1: Elementet ''{0}'' har enkel typ och f\u00E5r inte inneh\u00E5lla attribut, ut\u00F6ver s\u00E5dana vars namnrymd \u00E4r identisk med ''http://www.w3.org/2001/XMLSchema-instance'' och vars [lokala namn] har n\u00E5gotdera av ''type'', ''nil'', ''schemaLocation'' eller ''noNamespaceSchemaLocation''. Hittade dock attributet ''{1}''.
         cvc-type.3.1.2 = cvc-type.3.1.2: Elementet ''{0}'' har enkel typ och f\u00E5r inte inneh\u00E5lla [underordnade] med elementinformation.
         cvc-type.3.1.3 = cvc-type.3.1.3: V\u00E4rdet ''{1}'' i elementet ''{0}'' \u00E4r ogiltigt.
 
@@ -280,7 +280,7 @@
         rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: Det finns ingen fullst\u00E4ndigt fungerande mappning mellan partiklarna.
 #        We're using sch-props-correct.2 instead of the old src-redefine.1
 #        src-redefine.1 = src-redefine.1: The component ''{0}'' is begin redefined, but its corresponding component isn't in the schema document being redefined (with namespace ''{2}''), but in a different document, with namespace ''{1}''.
-        sch-props-correct.2 = sch-props-correct.2: Ett schema kan inte inneh\u00E5lla tv\u00E5 globala komponenter med samma namn. Detta schema har tv\u00E5 f\u00F6rekomster av ''{0}''.
+        sch-props-correct.2 = sch-props-correct.2: Ett schema f\u00E5r inte inneh\u00E5lla tv\u00E5 globala komponenter med samma namn. Detta schema har tv\u00E5 f\u00F6rekomster av ''{0}''.
         st-props-correct.2 = st-props-correct.2: Cirkul\u00E4ra definitioner har identifierats f\u00F6r enkel typ ''{0}''. Detta inneb\u00E4r att ''{0}'' ing\u00E5r i sin egen typhierarki, vilket \u00E4r fel.
         st-props-correct.3 = st-props-correct.3: Ett fel intr\u00E4ffade f\u00F6r typ ''{0}''. V\u00E4rdet f\u00F6r '{'slutgiltigt'}' i '{'bastypdefinitionen'}', ''{1}'', f\u00F6rbjuder h\u00E4rledning med begr\u00E4nsning.
         totalDigits-valid-restriction = totalDigits-valid-restriction: I definitionen f\u00F6r {2} \u00E4r v\u00E4rdet ''{0}'' f\u00F6r ''totalDigits'' ogiltigt eftersom det m\u00E5ste vara mindre \u00E4n eller lika med v\u00E4rdet f\u00F6r ''totalDigits'' som har angetts som ''{1}'' i n\u00E5gon typ f\u00F6r \u00F6verordnad.
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -211,10 +211,10 @@
       "Coroutine \uB9E4\uAC1C\uBCC0\uC218 \uC624\uB958({0})"},
 
     { ER_PARSER_DOTERMINATE_ANSWERS,
-      "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38 \uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."},
+      "\n\uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958: \uAD6C\uBB38\uBD84\uC11D\uAE30 doTerminate\uAC00 {0}\uC5D0 \uC751\uB2F5\uD569\uB2C8\uB2E4."},
 
     { ER_NO_PARSE_CALL_WHILE_PARSING,
-      "\uAD6C\uBB38 \uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+      "\uAD6C\uBB38\uBD84\uC11D \uC911 parse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED,
       "\uC624\uB958: {0} \uCD95\uC5D0 \uB300\uD574 \uC785\uB825\uB41C \uC774\uD130\uB808\uC774\uD130\uAC00 \uAD6C\uD604\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
@@ -244,13 +244,13 @@
       "\uB178\uB4DC\uB97C \uD578\uB4E4\uB85C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_STARTPARSE_WHILE_PARSING,
-       "\uAD6C\uBB38 \uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+       "\uAD6C\uBB38\uBD84\uC11D \uC911 startParse\uB97C \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_STARTPARSE_NEEDS_SAXPARSER,
        "startParse\uC5D0\uB294 \uB110\uC774 \uC544\uB2CC SAXParser\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."},
 
     { ER_COULD_NOT_INIT_PARSER,
-       "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+       "\uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_EXCEPTION_CREATING_POOL,
        "\uD480\uC5D0 \uB300\uD55C \uC0C8 \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD558\uB294 \uC911 \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."},
@@ -295,10 +295,10 @@
        "\uBD80\uBD84\uC5D0 \uBD80\uC801\uD569\uD55C \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
 
     { ER_PARSER_IN_USE,
-      "\uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."},
+      "\uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC774\uBBF8 \uC0AC\uC6A9\uB418\uACE0 \uC788\uC2B5\uB2C8\uB2E4."},
 
     { ER_CANNOT_CHANGE_WHILE_PARSING,
-      "\uAD6C\uBB38 \uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+      "\uAD6C\uBB38\uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
     { ER_SELF_CAUSATION_NOT_PERMITTED,
       "\uC790\uCCB4 \uC778\uACFC \uAD00\uACC4\uB294 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java	Wed Jul 05 23:36:51 2017 +0200
@@ -232,7 +232,7 @@
       "Axeltravers underst\u00F6ds inte: {0}"},
 
     { ER_NO_DTMIDS_AVAIL,
-      "Inga fler DTM-ID:n \u00E4r tillg\u00E4ngliga"},
+      "Inga fler DTM-id:n \u00E4r tillg\u00E4ngliga"},
 
     { ER_NOT_SUPPORTED,
       "Underst\u00F6ds inte: {0}"},
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -858,7 +858,7 @@
       "{0}\uC5D0\uC11C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
 
   { WG_EXPAND_ENTITIES_NOT_SUPPORTED,
-      "DTM \uAD6C\uBB38 \uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+      "DTM \uAD6C\uBB38\uBD84\uC11D\uAE30\uC5D0 \uB300\uD574\uC11C\uB294 -E \uC635\uC158\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
 
   { WG_ILLEGAL_VARIABLE_REFERENCE,
       "\uBCC0\uC218\uC5D0 \uB300\uD574 \uC81C\uACF5\uB41C VariableReference\uAC00 \uCEE8\uD14D\uC2A4\uD2B8\uC5D0\uC11C \uBC97\uC5B4\uB098\uAC70\uB098 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uC9C0 \uC5C6\uC2B5\uB2C8\uB2E4! \uC774\uB984 = {0}"},
@@ -886,9 +886,9 @@
   { "optionMatch", "   [-match \uC77C\uCE58 \uD328\uD134(\uC77C\uCE58 \uC9C4\uB2E8\uC758 \uACBD\uC6B0)]"},
   { "optionAnyExpr", "\uB610\uB294 XPath \uD45C\uD604\uC2DD\uC774 \uC9C4\uB2E8 \uB364\uD504\uB97C \uC218\uD589\uD569\uB2C8\uB2E4."},
   { "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
-  { "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
+  { "noParsermsg2", "** \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
   { "noParsermsg3", "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
-  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
+  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
   { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
   { "gtone", ">1" },
   { "zero", "0" },
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_de.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden.
-FormatFailed = Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n
+# General errors
+BadMessageKey = JAXP09000001: Die zum Meldungsschl\u00FCssel geh\u00F6rige Fehlermeldung kann nicht gefunden werden.
+FormatFailed = JAXP09000002: Beim Formatieren der folgenden Meldung ist ein interner Fehler aufgetreten:\n
+OtherError = JAXP09000003: Unerwarteter Fehler.
 
-#invalid catalog file
-InvalidCatalog = Das Dokumentelement eines Katalogs muss ein Katalog sein.
-InvalidEntryType = Der Eintragstyp "{0}" ist ung\u00FCltig.
-CircularReference = Zirkelbezug ist nicht zul\u00E4ssig: "{0}".
+# Implementation restriction
+CircularReference = JAXP09010001: Zirkelbezug ist nicht zul\u00E4ssig: "{0}".
 
-#errors
-UriNotAbsolute = Die angegebene URI "{0}" ist nicht absolut.
-UriNotValidUrl = Die angegebene URI "{0}" ist keine g\u00FCltige URL.
-InvalidArgument = Das angegebene Argument "{0}" (unter Beachtung der Gro\u00DF-/Kleinschreibung) f\u00FCr "{1}" ist nicht g\u00FCltig.
-NullArgument = Das Argument "{0}" darf nicht null sein.
-InvalidPath = Der Pfad "{0}" ist ung\u00FCltig.
-ParserConf = Unerwarteter Fehler bei der Konfiguration eines SAX-Parsers.
-ParsingFailed = Die Katalogdatei konnte nicht geparst werden.
-NoCatalogFound = Kein Katalog angegeben.
-NoMatchFound = Keine \u00DCbereinstimmung f\u00FCr publicId "{0}" und systemId "{1}" gefunden.
-NoMatchURIFound = Keine \u00DCbereinstimmung f\u00FCr href "{0}" und base "{1}" gefunden.
-FailedCreatingURI = URI kann nicht mit href "{0}" und base "{1}" erstellt werden.
-OtherError = Unerwarteter Fehler.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: Das Dokumentelement eines Katalogs muss ein Katalog sein.
+InvalidEntryType = JAXP09020002: Der Eintragstyp "{0}" ist nicht g\u00FCltig.
+UriNotAbsolute = JAXP09020003: Die angegebene URI "{0}" ist nicht absolut.
+UriNotValidUrl = JAXP09020004: Die angegebene URI "{0}" ist keine g\u00FCltige URL.
+InvalidArgument = JAXP09020005: Das angegebene Argument "{0}" (unter Beachtung der Gro\u00DF-/Kleinschreibung) f\u00FCr "{1}" ist nicht g\u00FCltig.
+NullArgument = JAXP09020006: Das Argument "{0}" darf nicht null sein.
+InvalidPath = JAXP09020007: Der Pfad "{0}" ist ung\u00FCltig.
+
+
+# Parsing errors
+ParserConf = JAXP09030001: Unerwarteter Fehler bei der Konfiguration eines SAX-Parsers.
+ParsingFailed = JAXP09030002: Die Katalogdatei konnte nicht geparst werden.
+NoCatalogFound = JAXP09030003: Kein Katalog angegeben.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: Keine \u00DCbereinstimmung f\u00FCr publicId "{0}" und systemId "{1}" gefunden.
+NoMatchURIFound = JAXP09040002: Keine \u00DCbereinstimmung f\u00FCr href "{0}" und base "{1}" gefunden.
+FailedCreatingURI = JAXP09040003: URI kann nicht mit href "{0}" und base "{1}" erstellt werden.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_es.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = No se ha encontrado el mensaje de error que corresponde a la clave de mensaje.
-FormatFailed = Se ha producido un error interno al formatear el siguiente mensaje:\n
+# General errors
+BadMessageKey = JAXP09000001: No se ha encontrado el mensaje de error que corresponde a la clave de mensaje.
+FormatFailed = JAXP09000002: Se ha producido un error interno al formatear el siguiente mensaje:\n
+OtherError = JAXP09000003: Error inesperado.
 
-#invalid catalog file
-InvalidCatalog = El elemento de documento de un cat\u00E1logo debe ser un cat\u00E1logo.
-InvalidEntryType = El tipo de entrada ''{0}'' no es v\u00E1lido.
-CircularReference = No est\u00E1 permitida la referencia circular: ''{0}''.
+# Implementation restriction
+CircularReference = JAXP09010001: No est\u00E1 permitida la referencia circular: ''{0}''.
 
-#errors
-UriNotAbsolute = El URI especificado ''{0}'' no es absoluto.
-UriNotValidUrl = El URI especificado ''{0}'' no es una URL v\u00E1lida.
-InvalidArgument = El argumento especificado ''{0}'' (sensible a may\u00FAsculas y min\u00FAsculas) para ''{1}'' no es v\u00E1lido.
-NullArgument = El argumento ''{0}'' no puede ser nulo.
-InvalidPath = La ruta ''{0}'' no es v\u00E1lida.
-ParserConf = Error inesperado al configurar el analizador SAX.
-ParsingFailed = Fallo al analizar el archivo de cat\u00E1logo.
-NoCatalogFound = No se ha especificado ning\u00FAn cat\u00E1logo.
-NoMatchFound = No se ha encontrado ninguna coincidencia para publicId ''{0}'' y systemId ''{1}''.
-NoMatchURIFound = No se ha encontrado ninguna coincidencia para href ''{0}'' y base ''{1}''.
-FailedCreatingURI = No se puede crear el URI con href ''{0}'' y base ''{1}''.
-OtherError = Error inesperado.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: El elemento de documento de un cat\u00E1logo debe ser un cat\u00E1logo.
+InvalidEntryType = JAXP09020002: El tipo de entrada ''{0}'' no es v\u00E1lido.
+UriNotAbsolute = JAXP09020003: El URI especificado ''{0}'' no es absoluto.
+UriNotValidUrl = JAXP09020004: El URI especificado ''{0}'' no es una URL v\u00E1lida.
+InvalidArgument = JAXP09020005: El argumento especificado ''{0}'' (sensible a may\u00FAsculas y min\u00FAsculas) para ''{1}'' no es v\u00E1lido.
+NullArgument = JAXP09020006: El argumento ''{0}'' no puede ser nulo.
+InvalidPath = JAXP09020007: La ruta ''{0}'' no es v\u00E1lida.
+
+
+# Parsing errors
+ParserConf = JAXP09030001: Error inesperado al configurar el analizador SAX.
+ParsingFailed = JAXP09030002: Fallo al analizar el archivo de cat\u00E1logo.
+NoCatalogFound = JAXP09030003: No se ha especificado ning\u00FAn cat\u00E1logo.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: No se ha encontrado ninguna coincidencia para publicId ''{0}'' y systemId ''{1}''.
+NoMatchURIFound = JAXP09040002: No se ha encontrado ninguna coincidencia para href ''{0}'' y base ''{1}''.
+FailedCreatingURI = JAXP09040003: No se puede crear el URI con href ''{0}'' y base ''{1}''.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_fr.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable.
-FormatFailed = Une erreur interne est survenue lors du formatage du message suivant :\n
+# General errors
+BadMessageKey = JAXP09000001 : Le message d'erreur correspondant \u00E0 la cl\u00E9 de message est introuvable.
+FormatFailed = JAXP09000002 : Une erreur interne est survenue lors du formatage du message suivant :\n
+OtherError = JAXP09000003 : Erreur inattendue.
 
-#invalid catalog file
-InvalidCatalog = L'\u00E9l\u00E9ment de document d'un catalogue doit \u00EAtre un catalogue.
-InvalidEntryType = Le type d''entr\u00E9e ''{0}'' n''est pas valide.
-CircularReference = La r\u00E9f\u00E9rence circulaire n''est pas autoris\u00E9e : ''{0}''.
+# Implementation restriction
+CircularReference = JAXP09010001 : La r\u00E9f\u00E9rence circulaire n''est pas autoris\u00E9e : ''{0}''.
 
-#errors
-UriNotAbsolute = L''URI indiqu\u00E9 ''{0}'' n''est pas absolu.
-UriNotValidUrl = L''URI indiqu\u00E9 ''{0}'' n''est pas une URL valide.
-InvalidArgument = L''argument indiqu\u00E9 ''{0}'' (respect maj./min.) pour ''{1}'' n''est pas valide.
-NullArgument = L''argument ''{0}'' ne peut pas \u00EAtre NULL.
-InvalidPath = Le chemin ''{0}'' n''est pas valide.
-ParserConf = Erreur inattendue lors de la configuration d'un analyseur SAX.
-ParsingFailed = Echec de l'analyse du fichier de catalogue.
-NoCatalogFound = Aucun catalogue n'est indiqu\u00E9.
-NoMatchFound = Aucune correspondance trouv\u00E9e pour publicId ''{0}'' et systemId ''{1}''.
-NoMatchURIFound = Aucune correspondance trouv\u00E9e pour l''\u00E9l\u00E9ment href ''{0}'' et la base ''{1}''.
-FailedCreatingURI = Impossible de construire l''URI \u00E0 l''aide de l''\u00E9l\u00E9ment href ''{0}'' et de la base ''{1}''.
-OtherError = Erreur inattendue.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001 : L'\u00E9l\u00E9ment de document d'un catalogue doit \u00EAtre un catalogue.
+InvalidEntryType = JAXP09020002 : Le type d''entr\u00E9e ''{0}'' n''est pas valide.
+UriNotAbsolute = JAXP09020003 : L''URI indiqu\u00E9 ''{0}'' n''est pas absolu.
+UriNotValidUrl = JAXP09020004 : L''URI indiqu\u00E9 ''{0}'' n''est pas une URL valide.
+InvalidArgument = JAXP09020005 : L''argument indiqu\u00E9 ''{0}'' (respect maj./min.) pour ''{1}'' n''est pas valide.
+NullArgument = JAXP09020006 : L''argument ''{0}'' ne peut pas \u00EAtre NULL.
+InvalidPath = JAXP09020007 : Le chemin ''{0}'' n''est pas valide.
+
+
+# Parsing errors
+ParserConf = JAXP09030001 : Erreur inattendue lors de la configuration d'un analyseur SAX.
+ParsingFailed = JAXP09030002 : Echec de l'analyse du fichier de catalogue.
+NoCatalogFound = JAXP09030003 : Aucun catalogue n'est indiqu\u00E9.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001 : Aucune correspondance trouv\u00E9e pour publicId ''{0}'' et systemId ''{1}''.
+NoMatchURIFound = JAXP09040002 : Aucune correspondance trouv\u00E9e pour l''\u00E9l\u00E9ment href ''{0}'' et la base ''{1}''.
+FailedCreatingURI = JAXP09040003 : Impossible de construire l''URI \u00E0 l''aide de l''\u00E9l\u00E9ment href ''{0}'' et de la base ''{1}''.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_it.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = Impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio.
-FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n
+# General errors
+BadMessageKey = JAXP09000001: impossibile trovare il messaggio di errore corrispondente alla chiave di messaggio.
+FormatFailed = JAXP09000002: si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n
+OtherError = JAXP09000003: errore imprevisto.
 
-#invalid catalog file
-InvalidCatalog = L'elemento documento di un catalogo deve essere un catalogo.
-InvalidEntryType = Il tipo di voce ''{0}'' non \u00E8 valido.
-CircularReference = La dipendenza circolare non \u00E8 consentita: ''{0}''.
+# Implementation restriction
+CircularReference = JAXP09010001: il riferimento circolare non \u00E8 consentito: ''{0}''.
 
-#errors
-UriNotAbsolute = L''URI specificato ''{0}'' non \u00E8 assoluto.
-UriNotValidUrl = L''URI specificato ''{0}'' non \u00E8 valido.
-InvalidArgument = L''argomento specificato ''{0}'' (con distinzione tra maiuscole e minuscole) per ''{1}'' non \u00E8 valido.
-NullArgument = L''argomento ''{0}'' non pu\u00F2 essere nullo.
-InvalidPath = Il percorso ''{0}'' non \u00E8 valido.
-ParserConf = Errore imprevisto durante la configurazione di un parser SAX.
-ParsingFailed = Analisi del file catalogo non riuscita.
-NoCatalogFound = Nessun catalogo specificato.
-NoMatchFound = Nessuna corrispondenza trovata per publicId ''{0}'' e systemId ''{1}''.
-NoMatchURIFound = Nessuna corrispondenza trovata per href ''{0}'' e base ''{1}''.
-FailedCreatingURI = Impossibile creare l''URI utilizzando href ''{0}'' e base ''{1}''.
-OtherError = Errore imprevisto.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: l'elemento documento di un catalogo deve essere un catalogo.
+InvalidEntryType = JAXP09020002: il tipo di voce ''{0}'' non \u00E8 valido.
+UriNotAbsolute = JAXP09020003: l''URI specificato ''{0}'' non \u00E8 assoluto.
+UriNotValidUrl = JAXP09020004: l''URI specificato ''{0}'' non \u00E8 valido.
+InvalidArgument = JAXP09020005: l''argomento specificato ''{0}'' (con distinzione tra maiuscole e minuscole) per ''{1}'' non \u00E8 valido.
+NullArgument = JAXP09020006: l''argomento ''{0}'' non pu\u00F2 essere nullo.
+InvalidPath = JAXP09020007: il percorso ''{0}'' non \u00E8 valido.
+
+
+# Parsing errors
+ParserConf = JAXP09030001: errore imprevisto durante la configurazione di un parser SAX.
+ParsingFailed = JAXP09030002: analisi del file catalogo non riuscita.
+NoCatalogFound = JAXP09030003: nessun catalogo specificato.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: nessuna corrispondenza trovata per publicId ''{0}'' e systemId ''{1}''.
+NoMatchURIFound = JAXP09040002: nessuna corrispondenza trovata per href ''{0}'' e base ''{1}''.
+FailedCreatingURI = JAXP09040003: impossibile creare l''URI utilizzando href ''{0}'' e base ''{1}''.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ja.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-FormatFailed = \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u66F8\u5F0F\u8A2D\u5B9A\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n
+# General errors
+BadMessageKey = JAXP09000001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30AD\u30FC\u306B\u5BFE\u5FDC\u3059\u308B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
+FormatFailed = JAXP09000002: \u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u4E2D\u306B\u5185\u90E8\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F:\n
+OtherError = JAXP09000003: \u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
 
-#invalid catalog file
-InvalidCatalog = \u30AB\u30BF\u30ED\u30B0\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u8981\u7D20\u306Fcatalog\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
-InvalidEntryType = \u30A8\u30F3\u30C8\u30EA\u30FB\u30BF\u30A4\u30D7''{0}''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-CircularReference = \u5FAA\u74B0\u53C2\u7167\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: ''{0}''\u3002
+# Implementation restriction
+CircularReference = JAXP09010001: \u5FAA\u74B0\u53C2\u7167\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: ''{0}''\u3002
 
-#errors
-UriNotAbsolute = \u6307\u5B9A\u3055\u308C\u305FURI ''{0}''\u304C\u7D76\u5BFEURI\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-UriNotValidUrl = \u6307\u5B9A\u3057\u305FURI ''{0}''\u306F\u6709\u52B9\u306AURL\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-InvalidArgument = ''{1}''\u306B\u6307\u5B9A\u3055\u308C\u305F\u5F15\u6570''{0}'' (\u5927/\u5C0F\u6587\u5B57\u3092\u533A\u5225)\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
-NullArgument = \u5F15\u6570''{0}''\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002
-InvalidPath = \u30D1\u30B9''{0}''\u306F\u7121\u52B9\u3067\u3059\u3002
-ParserConf = SAX\u30D1\u30FC\u30B5\u30FC\u306E\u69CB\u6210\u4E2D\u306B\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
-ParsingFailed = \u30AB\u30BF\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
-NoCatalogFound = \u30AB\u30BF\u30ED\u30B0\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
-NoMatchFound = publicId ''{0}''\u304A\u3088\u3073systemId ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-NoMatchURIFound = href ''{0}''\u304A\u3088\u3073base ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
-FailedCreatingURI = href ''{0}''\u304A\u3088\u3073base ''{1}''\u3092\u4F7F\u7528\u3057\u3066URI\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002
-OtherError = \u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: \u30AB\u30BF\u30ED\u30B0\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u8981\u7D20\u306Fcatalog\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+InvalidEntryType = JAXP09020002: \u30A8\u30F3\u30C8\u30EA\u30FB\u30BF\u30A4\u30D7''{0}''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u3055\u308C\u305FURI ''{0}''\u304C\u7D76\u5BFEURI\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u3057\u305FURI ''{0}''\u306F\u6709\u52B9\u306AURL\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+InvalidArgument = JAXP09020005: ''{1}''\u306B\u6307\u5B9A\u3055\u308C\u305F\u5F15\u6570''{0}'' (\u5927/\u5C0F\u6587\u5B57\u3092\u533A\u5225)\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+NullArgument = JAXP09020006: \u5F15\u6570''{0}''\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002
+InvalidPath = JAXP09020007: \u30D1\u30B9''{0}''\u306F\u7121\u52B9\u3067\u3059\u3002
+
+
+# Parsing errors
+ParserConf = JAXP09030001: SAX\u30D1\u30FC\u30B5\u30FC\u306E\u69CB\u6210\u4E2D\u306B\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002
+ParsingFailed = JAXP09030002: \u30AB\u30BF\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
+NoCatalogFound = JAXP09030003: \u30AB\u30BF\u30ED\u30B0\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: publicId ''{0}''\u304A\u3088\u3073systemId ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
+NoMatchURIFound = JAXP09040002: href ''{0}''\u304A\u3088\u3073base ''{1}''\u306B\u4E00\u81F4\u3059\u308B\u3082\u306E\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
+FailedCreatingURI = JAXP09040003: href ''{0}''\u304A\u3088\u3073base ''{1}''\u3092\u4F7F\u7528\u3057\u3066URI\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-FormatFailed = \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n
+# General errors
+BadMessageKey = JAXP09000001: \uBA54\uC2DC\uC9C0 \uD0A4\uC5D0 \uD574\uB2F9\uD558\uB294 \uC624\uB958 \uBA54\uC2DC\uC9C0\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+FormatFailed = JAXP09000002: \uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC758 \uD615\uC2DD\uC744 \uC9C0\uC815\uD558\uB294 \uC911 \uB0B4\uBD80 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n
+OtherError = JAXP09000003: \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uC785\uB2C8\uB2E4.
 
-#invalid catalog file
-InvalidCatalog = \uCE74\uD0C8\uB85C\uADF8\uC758 \uBB38\uC11C \uC694\uC18C\uB294 \uCE74\uD0C8\uB85C\uADF8\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-InvalidEntryType = \uD56D\uBAA9 \uC720\uD615 ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-CircularReference = \uC21C\uD658 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: ''{0}''.
+# Implementation restriction
+CircularReference = JAXP09010001: \uC21C\uD658 \uCC38\uC870\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: ''{0}''.
 
-#errors
-UriNotAbsolute = \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uC808\uB300 \uACBD\uB85C\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-UriNotValidUrl = \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD55C URL\uC785\uB2C8\uB2E4.
-InvalidArgument = ''{1}''\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uC778\uC218 ''{0}''(\uB300\uC18C\uBB38\uC790 \uAD6C\uBD84)\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-NullArgument = ''{0}'' \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-InvalidPath = ''{0}'' \uACBD\uB85C\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-ParserConf = SAX \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uAD6C\uC131\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-ParsingFailed = \uCE74\uD0C8\uB85C\uADF8 \uD30C\uC77C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-NoCatalogFound = \uC9C0\uC815\uB41C \uCE74\uD0C8\uB85C\uADF8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-NoMatchFound = publicId ''{0}'', systemId ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-NoMatchURIFound = href ''{0}'', base ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-FailedCreatingURI = href ''{0}'', base ''{1}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC URI\uB97C \uAD6C\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-OtherError = \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uC785\uB2C8\uB2E4.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: Catalog\uC758 \uBB38\uC11C \uC694\uC18C\uB294 \uCE74\uD0C8\uB85C\uADF8\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+InvalidEntryType = JAXP09020002: \uD56D\uBAA9 \uC720\uD615 ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+UriNotAbsolute = JAXP09020003: \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uC808\uB300 \uACBD\uB85C\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
+UriNotValidUrl = JAXP09020004: \uC9C0\uC815\uB41C URI ''{0}''\uC774(\uAC00) \uBD80\uC801\uD569\uD55C URL\uC785\uB2C8\uB2E4.
+InvalidArgument = JAXP09020005: ''{1}''\uC5D0 \uB300\uD574 \uC9C0\uC815\uB41C \uC778\uC218 ''{0}''(\uB300\uC18C\uBB38\uC790 \uAD6C\uBD84)\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+NullArgument = JAXP09020006: ''{0}'' \uC778\uC218\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+InvalidPath = JAXP09020007: ''{0}'' \uACBD\uB85C\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+
+
+# Parsing errors
+ParserConf = JAXP09030001: SAX \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uAD6C\uC131\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+ParsingFailed = JAXP09030002: Catalog \uD30C\uC77C\uC758 \uAD6C\uBB38\uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+NoCatalogFound = JAXP09030003: \uC9C0\uC815\uB41C catalog\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: publicId ''{0}'', systemId ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+NoMatchURIFound = JAXP09040002: href ''{0}'', base ''{1}''\uC5D0 \uB300\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+FailedCreatingURI = JAXP09040003: href ''{0}'', base ''{1}''\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC URI\uB97C \uAD6C\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_pt_BR.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem.
-FormatFailed = Ocorreu um erro interno ao formatar a mensagem a seguir:\n
+# General errors
+BadMessageKey = JAXP09000001: N\u00E3o foi poss\u00EDvel encontrar a mensagem de erro correspondente \u00E0 chave da mensagem.
+FormatFailed = JAXP09000002: Ocorreu um erro interno ao formatar a mensagem a seguir:\n
+OtherError = JAXP09000003: Erro inesperado.
 
-#invalid catalog file
-InvalidCatalog = O elemento de documento de um cat\u00E1logo deve ser o cat\u00E1logo.
-InvalidEntryType = O tipo de entrada "{0}" n\u00E3o \u00E9 v\u00E1lido.
-CircularReference = A refer\u00EAncia circular n\u00E3o \u00E9 permitida: ''{0}''.
+# Implementation restriction
+CircularReference = JAXP09010001: A refer\u00EAncia circular n\u00E3o \u00E9 permitida: ''{0}''.
 
-#errors
-UriNotAbsolute = O URI especificado ''{0}'' n\u00E3o \u00E9 absoluto.
-UriNotValidUrl = O URI especificado ''{0}'' n\u00E3o \u00E9 um URL v\u00E1lido.
-InvalidArgument = O argumento especificado ''{0}'' (distingue mai\u00FAsculas de min\u00FAsculas) para ''{1}'' n\u00E3o \u00E9 v\u00E1lido.
-NullArgument = O argumento ''{0}'' n\u00E3o pode ser nulo.
-InvalidPath = O caminho ''{0}'' \u00E9 inv\u00E1lido.
-ParserConf = Erro inesperado ao configurar um parser SAX.
-ParsingFailed = Falha ao fazer parsing do arquivo de cat\u00E1logo.
-NoCatalogFound = Nenhum arquivo do Cat\u00E1logo foi especificado.
-NoMatchFound = Nenhuma correspond\u00EAncia foi encontrada para publicId ''{0}'' e systemId ''{1}''.
-NoMatchURIFound = Nenhuma correspond\u00EAncia foi encontrada para href ''{0}'' e base ''{1}''.
-FailedCreatingURI = N\u00E3o \u00E9 poss\u00EDvel construir o URI usando href ''{0}'' e base ''{1}''.
-OtherError = Erro inesperado.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: O elemento de documento de um cat\u00E1logo deve ser o cat\u00E1logo.
+InvalidEntryType = JAXP09020002: O tipo de entrada "{0}" n\u00E3o \u00E9 v\u00E1lido.
+UriNotAbsolute = JAXP09020003: O URI especificado ''{0}'' n\u00E3o \u00E9 absoluto.
+UriNotValidUrl = JAXP09020004: O URI especificado ''{0}'' n\u00E3o \u00E9 um URL v\u00E1lido.
+InvalidArgument = JAXP09020005: O argumento especificado ''{0}'' (distingue mai\u00FAsculas de min\u00FAsculas) para ''{1}'' n\u00E3o \u00E9 v\u00E1lido.
+NullArgument = JAXP09020006: O argumento ''{0}'' n\u00E3o pode ser nulo.
+InvalidPath = JAXP09020007: O caminho ''{0}'' \u00E9 inv\u00E1lido.
+
+
+# Parsing errors
+ParserConf = JAXP09030001: Erro inesperado ao configurar um parser SAX.
+ParsingFailed = JAXP09030002: Falha ao fazer parsing do arquivo de cat\u00E1logo.
+NoCatalogFound = JAXP09030003: Nenhum Cat\u00E1logo foi especificado.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: Nenhuma correspond\u00EAncia foi encontrada para publicId ''{0}'' e systemId ''{1}''.
+NoMatchURIFound = JAXP09040002: Nenhuma correspond\u00EAncia foi encontrada para href ''{0}'' e base ''{1}''.
+FailedCreatingURI = JAXP09040003: N\u00E3o \u00E9 poss\u00EDvel construir o URI usando href ''{0}'' e base ''{1}''.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = Hittar inte felmeddelandet som motsvarar meddelandenyckeln.
-FormatFailed = Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n
+# General errors
+BadMessageKey = JAXP09000001: Det felmeddelande som motsvarar meddelandenyckeln kan inte hittas.
+FormatFailed = JAXP09000002: Ett internt fel intr\u00E4ffade vid formatering av f\u00F6ljande meddelande:\n
+OtherError = JAXP09000003: Ov\u00E4ntat fel.
 
-#invalid catalog file
-InvalidCatalog = Dokumentelementet f\u00F6r en katalog m\u00E5ste vara "catalog".
-InvalidEntryType = Posttypen ''{0}'' \u00E4r inte giltig.
-CircularReference = Cirkul\u00E4r referens \u00E4r inte till\u00E5ten: ''{0}''.
+# Implementation restriction
+CircularReference = JAXP09010001: Cirkul\u00E4r referens \u00E4r inte till\u00E5ten: ''{0}''.
 
-#errors
-UriNotAbsolute = Den angivna URI:n, ''{0}'', \u00E4r inte absolut.
-UriNotValidUrl = Den angivna URI:n, ''{0}'', \u00E4r inte en giltig URL.
-InvalidArgument = Det angivna argumentet, ''{0}'' (skiftl\u00E4gesk\u00E4nsligt), f\u00F6r ''{1}'' \u00E4r inte giltigt.
-NullArgument = Argumentet ''{0}'' kan inte vara null.
-InvalidPath = S\u00F6kv\u00E4gen ''{0}'' \u00E4r ogiltig.
-ParserConf = Ov\u00E4ntat fel vid konfiguration av en SAX-parser.
-ParsingFailed = Kunde inte tolka katalogfilen.
-NoCatalogFound = Ingen katalog har angetts.
-NoMatchFound = Ingen matchning hittades f\u00F6r publicId = ''{0}'' och systemId = ''{1}''.
-NoMatchURIFound = Ingen matchning hittades f\u00F6r href = ''{0}'' och bas = ''{1}''.
-FailedCreatingURI = Kan inte skapa URI med href = ''{0}'' och bas = ''{1}''.
-OtherError = Ov\u00E4ntat fel.
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: Dokumentelementet f\u00F6r en katalog m\u00E5ste vara "catalog".
+InvalidEntryType = JAXP09020002: Posttypen ''{0}'' \u00E4r inte giltig.
+UriNotAbsolute = JAXP09020003: Den angivna URI:n, ''{0}'', \u00E4r inte absolut.
+UriNotValidUrl = JAXP09020004: Den angivna URI:n, ''{0}'', \u00E4r inte en giltig URL.
+InvalidArgument = JAXP09020005: Det angivna argumentet, ''{0}'' (skiftl\u00E4gesk\u00E4nsligt), f\u00F6r ''{1}'' \u00E4r inte giltigt.
+NullArgument = JAXP09020006: Argumentet ''{0}'' kan inte vara null.
+InvalidPath = JAXP09020007: S\u00F6kv\u00E4gen ''{0}'' \u00E4r ogiltig.
+
+
+# Parsing errors
+ParserConf = JAXP09030001: Ov\u00E4ntat fel vid konfiguration av en SAX-parser.
+ParsingFailed = JAXP09030002: Kunde inte tolka katalogfilen.
+NoCatalogFound = JAXP09030003: Ingen katalog har angetts.
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: Ingen matchning hittades f\u00F6r publicId = ''{0}'' och systemId = ''{1}''.
+NoMatchURIFound = JAXP09040002: Ingen matchning hittades f\u00F6r href = ''{0}'' och bas = ''{1}''.
+FailedCreatingURI = JAXP09040003: Kan inte skapa URI med href = ''{0}'' och bas = ''{1}''.
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_CN.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002
-FormatFailed = \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n
+# General errors
+BadMessageKey = JAXP09000001: \u627E\u4E0D\u5230\u4E0E\u6D88\u606F\u5173\u952E\u5B57\u5BF9\u5E94\u7684\u9519\u8BEF\u6D88\u606F\u3002
+FormatFailed = JAXP09000002: \u8BBE\u7F6E\u4EE5\u4E0B\u6D88\u606F\u7684\u683C\u5F0F\u65F6\u51FA\u73B0\u5185\u90E8\u9519\u8BEF:\n
+OtherError = JAXP09000003: \u610F\u5916\u9519\u8BEF\u3002
 
-#invalid catalog file
-InvalidCatalog = \u76EE\u5F55\u7684\u6587\u6863\u5143\u7D20\u5FC5\u987B\u662F\u76EE\u5F55\u3002
-InvalidEntryType = \u6761\u76EE\u7C7B\u578B ''{0}'' \u65E0\u6548\u3002
-CircularReference = \u4E0D\u5141\u8BB8\u5FAA\u73AF\u5F15\u7528: ''{0}''\u3002
+# Implementation restriction
+CircularReference = JAXP09010001: \u4E0D\u5141\u8BB8\u5FAA\u73AF\u5F15\u7528: ''{0}''\u3002
 
-#errors
-UriNotAbsolute = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7EDD\u5BF9 URI\u3002
-UriNotValidUrl = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002
-InvalidArgument = \u4E3A ''{1}'' \u6307\u5B9A\u7684\u53C2\u6570 ''{0}'' (\u533A\u5206\u5927\u5C0F\u5199) \u65E0\u6548\u3002
-NullArgument = \u53C2\u6570 ''{0}'' \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002
-InvalidPath = \u8DEF\u5F84 ''{0}'' \u65E0\u6548\u3002
-ParserConf = \u914D\u7F6E SAX \u89E3\u6790\u5668\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF\u3002
-ParsingFailed = \u65E0\u6CD5\u5BF9\u76EE\u5F55\u6587\u4EF6\u8FDB\u884C\u89E3\u6790\u3002
-NoCatalogFound = \u672A\u6307\u5B9A\u76EE\u5F55\u3002
-NoMatchFound = \u5BF9\u4E8E publicId ''{0}'' \u548C systemId ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002
-NoMatchURIFound = \u5BF9\u4E8E href ''{0}'' \u548C base ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002
-FailedCreatingURI = \u65E0\u6CD5\u4F7F\u7528 href ''{0}'' \u548C base ''{1}'' \u6784\u9020 URI\u3002
-OtherError = \u610F\u5916\u9519\u8BEF\u3002
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: catalog \u7684\u6587\u6863\u5143\u7D20\u5FC5\u987B\u662F catalog\u3002
+InvalidEntryType = JAXP09020002: \u6761\u76EE\u7C7B\u578B ''{0}'' \u65E0\u6548\u3002
+UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7EDD\u5BF9\u7684\u3002
+UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002
+InvalidArgument = JAXP09020005: \u4E3A ''{1}'' \u6307\u5B9A\u7684\u53C2\u6570 ''{0}'' (\u533A\u5206\u5927\u5C0F\u5199) \u65E0\u6548\u3002
+NullArgument = JAXP09020006: \u53C2\u6570 ''{0}'' \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002
+InvalidPath = JAXP09020007: \u8DEF\u5F84 ''{0}'' \u65E0\u6548\u3002
+
+
+# Parsing errors
+ParserConf = JAXP09030001: \u914D\u7F6E SAX \u89E3\u6790\u5668\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF\u3002
+ParsingFailed = JAXP09030002: \u65E0\u6CD5\u5BF9 catalog \u6587\u4EF6\u8FDB\u884C\u89E3\u6790\u3002
+NoCatalogFound = JAXP09030003: \u672A\u6307\u5B9A catalog\u3002
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: \u5BF9\u4E8E publicId ''{0}'' \u548C systemId ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002
+NoMatchURIFound = JAXP09040002: \u5BF9\u4E8E href ''{0}'' \u548C base ''{1}'', \u672A\u627E\u5230\u5339\u914D\u9879\u3002
+FailedCreatingURI = JAXP09040003: \u65E0\u6CD5\u4F7F\u7528 href ''{0}'' \u548C base ''{1}'' \u6784\u9020 URI\u3002
+
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogMessages_zh_TW.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -21,25 +21,32 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 
-# Messages for message reporting
-BadMessageKey = \u627E\u4E0D\u5230\u5C0D\u61C9\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002
-FormatFailed = \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n
+# General errors
+BadMessageKey = JAXP09000001: \u627E\u4E0D\u5230\u76F8\u5C0D\u61C9\u65BC\u6B64\u8A0A\u606F\u7D22\u5F15\u9375\u7684\u932F\u8AA4\u8A0A\u606F\u3002
+FormatFailed = JAXP09000002: \u683C\u5F0F\u5316\u4E0B\u5217\u8A0A\u606F\u6642\u767C\u751F\u5167\u90E8\u932F\u8AA4:\n
+OtherError = JAXP09000003: \u672A\u9810\u671F\u7684\u932F\u8AA4\u3002
 
-#invalid catalog file
-InvalidCatalog = \u76EE\u9304\u7684\u6587\u4EF6\u5143\u7D20\u5FC5\u9808\u662F\u76EE\u9304\u3002
-InvalidEntryType = \u9805\u76EE\u985E\u578B ''{0}'' \u7121\u6548\u3002
-CircularReference = \u4E0D\u5141\u8A31\u5FAA\u74B0\u53C3\u7167: ''{0}''\u3002
+# Implementation restriction
+CircularReference = JAXP09010001: \u4E0D\u5141\u8A31\u5FAA\u74B0\u53C3\u7167: ''{0}''\u3002
 
-#errors
-UriNotAbsolute = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7D55\u5C0D\u8DEF\u5F91\u3002
-UriNotValidUrl = \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002
-InvalidArgument = ''{1}'' \u7684\u6307\u5B9A\u5F15\u6578 ''{0}'' (\u6709\u5927\u5C0F\u5BEB\u4E4B\u5206) \u7121\u6548\u3002
-NullArgument = \u5F15\u6578''{0}'' \u4E0D\u53EF\u70BA\u7A7A\u503C\u3002
-InvalidPath = \u8DEF\u5F91 ''{0}'' \u7121\u6548\u3002
-ParserConf = \u8A2D\u5B9A SAX \u5256\u6790\u5668\u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4\u3002
-ParsingFailed = \u7121\u6CD5\u5256\u6790\u76EE\u9304\u6A94\u6848\u3002
-NoCatalogFound = \u672A\u6307\u5B9A\u4EFB\u4F55\u76EE\u9304\u3002
-NoMatchFound = \u627E\u4E0D\u5230\u76F8\u7B26\u7684 publicId ''{0}'' \u548C systemId ''{1}''\u3002
-NoMatchURIFound = \u627E\u4E0D\u5230\u76F8\u7B26\u7684 href ''{0}'' \u548C\u57FA\u790E ''{1}''\u3002
-FailedCreatingURI = \u7121\u6CD5\u4F7F\u7528 href ''{0}'' \u548C\u57FA\u790E ''{1}'' \u5EFA\u69CB URI\u3002
-OtherError = \u672A\u9810\u671F\u7684\u932F\u8AA4\u3002
+# Input or configuration errors
+InvalidCatalog = JAXP09020001: Catalog \u7684\u6587\u4EF6\u5143\u7D20\u5FC5\u9808\u662F Catalog\u3002
+InvalidEntryType = JAXP09020002: \u9805\u76EE\u985E\u578B ''{0}'' \u7121\u6548\u3002
+UriNotAbsolute = JAXP09020003: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u7D55\u5C0D\u8DEF\u5F91\u3002
+UriNotValidUrl = JAXP09020004: \u6307\u5B9A\u7684 URI ''{0}'' \u4E0D\u662F\u6709\u6548\u7684 URL\u3002
+InvalidArgument = JAXP09020005: \u70BA ''{1}'' \u6307\u5B9A\u7684\u5F15\u6578 ''{0}'' (\u6709\u5927\u5C0F\u5BEB\u4E4B\u5206) \u7121\u6548\u3002
+NullArgument = JAXP09020006: \u5F15\u6578''{0}'' \u4E0D\u53EF\u70BA\u7A7A\u503C\u3002
+InvalidPath = JAXP09020007: \u8DEF\u5F91 ''{0}'' \u7121\u6548\u3002
+
+
+# Parsing errors
+ParserConf = JAXP09030001: \u8A2D\u5B9A SAX \u5256\u6790\u5668\u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4\u3002
+ParsingFailed = JAXP09030002: \u7121\u6CD5\u5256\u6790 Catalog \u6A94\u6848\u3002
+NoCatalogFound = JAXP09030003: \u672A\u6307\u5B9A Catalog\u3002
+
+
+# Resolving errors
+NoMatchFound = JAXP09040001: \u627E\u4E0D\u5230\u7B26\u5408 publicId ''{0}'' \u548C systemId ''{1}'' \u7684\u9805\u76EE\u3002
+NoMatchURIFound = JAXP09040002: \u627E\u4E0D\u5230\u7B26\u5408 href ''{0}'' \u548C\u57FA\u790E ''{1}'' \u7684\u9805\u76EE\u3002
+FailedCreatingURI = JAXP09040003: \u7121\u6CD5\u4F7F\u7528 href ''{0}'' \u548C\u57FA\u790E ''{1}'' \u5EFA\u69CB URI\u3002
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,71 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ * Provides the classes for implementing
+ * <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html">
+ *     XML Catalogs OASIS Standard V1.1, 7 October 2005</a>.
+ *
+ * <p>
+ * The Catalog API defines a standard solution for resolving external resources
+ * referenced by XML documents. It is fully supported by the XML Processors
+ * allowing application developers to configure a catalog through an XML processor
+ * or system property or the jaxp.properties file to take advantage of the feature.
+ * <p>
+ * The XML Catalog API defines the following interfaces:
+ * <ul>
+ *     <li>{@link Catalog} -- The {@link Catalog} interface represents an entity
+ *         catalog as defined by the Catalog standard. A {@link Catalog} object
+ *         is immutable. Once created, it can be used to find matches in a
+ *         {@code system}, {@code public} or {@code uri} entry.
+ *         A custom resolver implementation may find it useful for locating local
+ *         resources through a catalog.
+ *     </li>
+ *     <li>{@link CatalogFeatures} -- The {@link CatalogFeatures} class holds all
+ *         of the features and properties the Catalog API supports, including
+ *         {@code javax.xml.catalog.files}, {@code javax.xml.catalog.defer},
+ *         {@code javax.xml.catalog.prefer}, and {@code javax.xml.catalog.resolve}.
+ *     </li>
+ *     <li>{@link CatalogManager} -- The {@link CatalogManager} class manages the
+ *         creation of XML catalogs and catalog resolvers.
+ *     </li>
+ *     <li>{@link CatalogResolver} -- The {@link CatalogResolver} class is a
+ *         {@code Catalog} resolver that implements {@link org.xml.sax.EntityResolver},
+ *         {@link javax.xml.stream.XMLResolver}, {@link org.w3c.dom.ls.LSResourceResolver},
+ *         and {@link javax.xml.transform.URIResolver}, and resolves external
+ *         references using catalogs.
+ *     </li>
+ * </ul>
+ * <p>
+ * Unless otherwise noted, passing a null argument to
+ * a constructor or method in any class or interface in this package will
+ * cause a {@code NullPointerException} to be thrown.
+ *
+ * @since 9
+ *
+ */
+
+package javax.xml.catalog;
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-<!--
-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
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-</head>
-<body>
-
-    Provides the classes for implementing 
-    <a href="https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html">
-        XML Catalogs OASIS Standard V1.1, 7 October 2005</a>. 
-
-    <p>
-        Unless otherwise noted, passing a null argument to 
-        a constructor or method in any class or interface in this package will 
-        cause a <code>NullPointerException</code> to be thrown.
-    </p>
-
-@since 9
-
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,172 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ * <p>
+ * Defines XML/Java Type Mappings.
+ *
+ * <p>
+ * This API provides XML/Java type mappings.
+ *
+ * <p>
+ * The following XML standards apply:
+ *
+ * <ul>
+ *     <li><a href="http://www.w3.org/TR/xmlschema-2/#dateTime">
+ *             W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a>
+ *     </li>
+ *     <li><a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
+ *             XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>
+ *     </li>
+ *     <li><a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">
+ *             XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>
+ *     </li>
+ * </ul>
+ *
+ * <hr>
+ *
+ * <table class="striped">
+ *     <caption> W3C XML Schema/Java Type Mappings</caption>
+ *     <thead>
+ *         <tr>
+ *             <th>W3C XML Schema Data Type</th>
+ *             <th>Java Data Type</th>
+ *         </tr>
+ *     </thead>
+ *
+ *     <tbody>
+ *         <tr>
+ *             <td>xs:date</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:dateTime</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:duration</td>
+ *             <td>{@link javax.xml.datatype.Duration}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:gDay</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:gMonth </td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:gMonthDay</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:gYear</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:gYearMonth</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xs:time</td>
+ *             <td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
+ *         </tr>
+ *
+ *     </tbody>
+ * </table>
+ *
+ * <hr>
+ *
+ *
+ * <table class="striped">
+ *     <caption>XQuery and XPath/Java Type Mappings</caption>
+ *     <thead>
+ *         <tr>
+ *             <th>XQuery 1.0 and XPath 2.0 Data Model</th>
+ *             <th>Java Data Type</th>
+ *         </tr>
+ *     </thead>
+ *
+ *     <tbody>
+ *         <tr>
+ *             <td>xdt:dayTimeDuration</td>
+ *             <td>{@link javax.xml.datatype.Duration}</td>
+ *         </tr>
+ *         <tr>
+ *             <td>xdt:yearMonthDuration</td>
+ *             <td>{@link javax.xml.datatype.Duration}</td>
+ *         </tr>
+ *     </tbody>
+ * </table>
+ *
+ * <hr>
+ *
+ * <p>
+ * W3C XML Schema data types that have a "<em>natural</em>" mapping to Java types are defined by
+ * JSR 31: Java&trade; Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations.
+ * JAXB defined mappings for XML Schema built-in data types include:
+ *
+ * <ul>
+ *     <li>xs:anySimpleType</li>
+ *     <li>xs:base64Binary</li>
+ *     <li>xs:boolean</li>
+ *     <li>xs:byte</li>
+ *     <li>xs:decimal</li>
+ *     <li>xs:double</li>
+ *     <li>xs:float</li>
+ *     <li>xs:hexBinary</li>
+ *     <li>xs:int</li>
+ *     <li>xs:integer</li>
+ *     <li>xs:long</li>
+ *     <li>xs:QName</li>
+ *     <li>xs:short</li>
+ *     <li>xs:string</li>
+ *     <li>xs:unsignedByte</li>
+ *     <li>xs:unsignedInt</li>
+ *     <li>xs:unsignedShort</li>
+ * </ul>
+ *
+ * <hr>
+ *
+ * <ul>
+ *     <li>Author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a></li>
+ *     <li>See <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">
+ *             W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a>
+ *     </li>
+ *     <li>See <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
+ *             XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>
+ *     </li>
+ *     <li>See <a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">
+ *             XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>
+ *     </li>
+ *     <li>Since 1.5</li>
+ * </ul>
+ *
+ * <hr>
+ * @since 1.5
+ */
+
+package javax.xml.datatype;
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<html>
-
-	<head>
-		<title>javax.xml.xpath</title>
-
-		<meta name="@author" content="mailto:Jeff.Suttor@Sun.com" />
-		<meta name="@see" content='<a href="http://www.w3.org/TR/xmlschema-2/#dateTime">W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a>' />
-		<meta name="@see" content='<a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>' />
-		<meta name="@see" content='<a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>' />
-		<meta name="@since" content="1.5" />
-	</head>
-
-	<body>
-
-		<p>XML/Java Type Mappings.</p>
-		
-		<p><code>javax.xml.datatype</code>API provides XML/Java type mappings.</p>
-		
-		<p>The following XML standards apply:</p>
-		<ul>
-			<li><a href="http://www.w3.org/TR/xmlschema-2/#dateTime">W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a></li>
-			<li><a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a></li>
-			<li><a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a></li>
-		</ul>
-
-		<hr>
-		
-		<table class="striped">
-			<caption> W3C XML Schema/Java Type Mappings</caption>
-			<thead>
-				<tr>
-					<th>W3C XML Schema Data Type</th>
-					<th>Java Data Type</th>
-				</tr>
-			</thead>
-			
-			<tbody>
-				<tr>
-					<td>xs:date</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:dateTime</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:duration</td>
-					<td>{@link javax.xml.datatype.Duration}</td>
-				</tr>
-				<tr>
-					<td>xs:gDay</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:gMonth </td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:gMonthDay</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:gYear</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:gYearMonth</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				<tr>
-					<td>xs:time</td>
-					<td>{@link javax.xml.datatype.XMLGregorianCalendar}</td>
-				</tr>
-				
-			</tbody>
-		</table>
-		
-		<hr>
-		
-		
-		<table class="striped">
-			<caption>XQuery and XPath/Java Type Mappings</caption>
-			<thead>
-				<tr>
-					<th>XQuery 1.0 and XPath 2.0 Data Model</th>
-					<th>Java Data Type</th>
-				</tr>
-			</thead>
-			
-			<tbody>
-				<tr>
-					<td>xdt:dayTimeDuration</td>
-					<td>{@link javax.xml.datatype.Duration}</td>
-				</tr>
-				<tr>
-					<td>xdt:yearMonthDuration</td>
-					<td>{@link javax.xml.datatype.Duration}</td>
-				</tr>
-			</tbody>
-		</table>
-		
-		<hr>
-		
-		<p>
-			W3C XML Schema data types that have a "<em>natural</em>" mapping to Java types are defined by
-			JSR 31: Java&trade; Architecture for XML Binding (JAXB) Specification, Binding XML Schema to Java Representations.
-			JAXB defined mappings for XML Schema built-in data types include:
-		</p>
-		<ul>
-			<li>xs:anySimpleType</li>
-			<li>xs:base64Binary</li>
-			<li>xs:boolean</li>
-			<li>xs:byte</li>
-			<li>xs:decimal</li>
-			<li>xs:double</li>
-			<li>xs:float</li>
-			<li>xs:hexBinary</li>
-			<li>xs:int</li>
-			<li>xs:integer</li>
-			<li>xs:long</li>
-			<li>xs:QName</li>
-			<li>xs:short</li>
-			<li>xs:string</li>
-			<li>xs:unsignedByte</li>
-			<li>xs:unsignedInt</li>
-			<li>xs:unsignedShort</li>
-		</ul>
-		
-		<hr>
-		
-
-		<ul>
-			<li>Author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a></li>
-			<li>See <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a></li>
-			<li>See <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a></li>
-			<li>See <a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a></li>
-			<li>Since 1.5</li>
-		</ul>
-		
-		<hr>
-		
-
-	</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/namespace/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ * <p>
+ * Defines XML Namespace processing.
+ *
+ * <p>
+ * The following XML standards apply:
+ *
+ * <ul>
+ *     <li><a href="http://www.w3.org/TR/xmlschema-2/#QName">
+ *             XML Schema Part2: Datatypes specification</a>
+ *     </li>
+ *     <li><a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
+ *             Namespaces in XML</a>
+ *     </li>
+ *     <li><a href="http://www.w3.org/XML/xml-names-19990114-errata">
+ *             Namespaces in XML Errata</a>
+ *     </li>
+ * </ul>
+ *
+ * @since 1.5
+ */
+
+package javax.xml.namespace;
--- a/jaxp/src/java.xml/share/classes/javax/xml/namespace/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-  <title>javax.xml.namespace</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:28 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-
-<body>
-
-<p>XML Namespace processing.</p>
-
-<p>The following XML standards apply:</p>
-<ul>
-  <li><a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part2: Datatypes specification</a></li>
-  <li><a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">Namespaces in XML</a></li>
-  <li><a href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a></li>
-</ul>
-
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,34 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ * Defines constants for XML processing.
+ *
+ * @since 1.5
+ *
+ */
+
+package javax.xml;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <p>
+ * Provides the classes for processing XML documents with a SAX (Simple API for XML)
+ * parser or a DOM (Document Object Model) Document builder. The JAXP Plugability
+ * layer allows an application programmer to specify an implementation and
+ * configure where to locate it.
+ *
+ * @since 1.4
+ */
+
+package javax.xml.parsers;
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-  <title>javax.xml.parsers</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:29 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-<body>
-	<p>
-		Provides classes allowing the processing of XML documents. Two types
-		of plugable parsers are supported:
-	</p>
-	<ul>
-		<li>SAX (Simple API for XML)</li>
-		<li>DOM (Document Object Model)</li>
-	</ul>
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/events/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,32 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Defines event interfaces for the Streaming API for XML (StAX).
+ *
+ * @since 1.6
+ */
+
+package javax.xml.stream.events;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,51 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <p>
+ * Defines interfaces and classes for the Streaming API for XML (StAX).
+ *
+ * <p>
+ * StAX provides two basic functions: the cursor API allowing users to
+ * read and write XML efficiently, and the event iterator API promoting
+ * ease of use that is event based, easy to extend and pipeline.
+ * The event iterator API is intended to layer on top of the cursor API.
+ *
+ * <p>
+ * The cursor API defines two interfaces: {@link XMLStreamReader}
+ * and {@link XMLStreamWriter}, while the event iterator API defines:
+ * {@link XMLEventReader} and {@link XMLEventWriter}.
+ *
+ * <p>
+ * StAX supports plugability with {@link XMLInputFactory} and
+ * {@link XMLOutputFactory} that define how an implementation is
+ * located through a process as described in the {@link newFactory}
+ * method.
+ *
+ *
+ * @since 1.6
+ */
+
+package javax.xml.stream;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/util/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,32 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides utility classes for the Streaming API for XML (StAX).
+ *
+ * @since 1.6
+ */
+
+package javax.xml.stream.util;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,61 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides DOM specific transformation classes.
+ * <p>
+ * The {@link javax.xml.transform.dom.DOMSource} class allows the
+ * client of the implementation of this API to specify a DOM
+ * {@link org.w3c.dom.Node} as the source of the input tree. The model of
+ * how the Transformer deals with the DOM tree in terms of mismatches with the
+ * <A href="http://www.w3.org/TR/xslt#data-model">XSLT data model</A> or
+ * other data models is beyond the scope of this document. Any of the nodes
+ * derived from {@link org.w3c.dom.Node} are legal input.
+ * <p>
+ * The {@link javax.xml.transform.dom.DOMResult} class allows
+ * a {@link org.w3c.dom.Node} to be specified to which result DOM nodes will
+ * be appended. If an output node is not specified, the transformer will use
+ * {@link javax.xml.parsers.DocumentBuilder#newDocument} to create an
+ * output {@link org.w3c.dom.Document} node. If a node is specified, it
+ * should be one of the following: {@link org.w3c.dom.Document},
+ * {@link org.w3c.dom.Element}, or
+ * {@link org.w3c.dom.DocumentFragment}. Specification of any other node
+ * type is implementation dependent and undefined by this API. If the result is a
+ * {@link org.w3c.dom.Document}, the output of the transformation must have
+ * a single element root to set as the document element.
+ * <p>
+ * The {@link javax.xml.transform.dom.DOMLocator} node may be passed
+ * to {@link javax.xml.transform.TransformerException} objects, and
+ * retrieved by trying to cast the result of the
+ * {@link javax.xml.transform.TransformerException#getLocator()} method.
+ * The implementation has no responsibility to use a DOMLocator instead of a
+ * {@link javax.xml.transform.SourceLocator} (though line numbers and the
+ * like do not make much sense for a DOM), so the result of getLocator must always
+ * be tested with an instanceof.
+ *
+ * @since 1.5
+ */
+
+package javax.xml.transform.dom;
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-  <title>javax.xml.transform.dom</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:40 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-<body>
-<p>This package implements DOM-specific transformation APIs.</p>
-<p>The {@link javax.xml.transform.dom.DOMSource} class allows the
-client of the implementation of this API to specify a DOM
-{@link org.w3c.dom.Node} as the source of the input tree. The model of
-how the Transformer deals with the DOM tree in terms of mismatches with the
-<A href="http://www.w3.org/TR/xslt#data-model">XSLT data model</A> or
-other data models is beyond the scope of this document. Any of the nodes
-derived from {@link org.w3c.dom.Node} are legal input.</p>
-<p>The {@link javax.xml.transform.dom.DOMResult} class allows
-a {@link org.w3c.dom.Node} to be specified to which result DOM nodes will
-be appended. If an output node is not specified, the transformer will use
-{@link javax.xml.parsers.DocumentBuilder#newDocument} to create an
-output {@link org.w3c.dom.Document} node. If a node is specified, it
-should be one of the following: {@link org.w3c.dom.Document},
-{@link org.w3c.dom.Element}, or
-{@link org.w3c.dom.DocumentFragment}. Specification of any other node
-type is implementation dependent and undefined by this API. If the result is a
-{@link org.w3c.dom.Document}, the output of the transformation must have
-a single element root to set as the document element.</p>
-<p>The {@link javax.xml.transform.dom.DOMLocator} node may be passed
-to {@link javax.xml.transform.TransformerException} objects, and
-retrieved by trying to cast the result of the
-{@link javax.xml.transform.TransformerException#getLocator()} method.
-The implementation has no responsibility to use a DOMLocator instead of a
-{@link javax.xml.transform.SourceLocator} (though line numbers and the
-like do not make much sense for a DOM), so the result of getLocator must always
-be tested with an instanceof. </p>
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,216 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Defines the generic APIs for processing transformation instructions,
+ * and performing a transformation from source to result. These interfaces have no
+ * dependencies on SAX or the DOM standard, and try to make as few assumptions as
+ * possible about the details of the source and result of a transformation. It
+ * achieves this by defining {@link javax.xml.transform.Source} and
+ * {@link javax.xml.transform.Result} interfaces.
+ *
+ * <p>
+ * To provide concrete classes for the user, the API defines specializations
+ * of the interfaces found at the root level. These interfaces are found in
+ * {@link javax.xml.transform.sax}, {@link javax.xml.transform.dom},
+ * {@link javax.xml.transform.stax}, and {@link javax.xml.transform.stream}.
+ *
+ *
+ * <h3>Creating Objects</h3>
+ *
+ * <p>
+ * The API allows a concrete {@link javax.xml.transform.TransformerFactory}
+ * object to be created from the static function
+ * {@link javax.xml.transform.TransformerFactory#newInstance}.
+ *
+ *
+ * <h3>Specification of Inputs and Outputs</h3>
+ *
+ * <p>
+ * This API defines two interface objects called {@link javax.xml.transform.Source}
+ * and {@link javax.xml.transform.Result}. In order to pass Source and Result
+ * objects to the interfaces, concrete classes must be used. The following concrete
+ * representations are defined for each of these objects:
+ * {@link javax.xml.transform.stream.StreamSource} and
+ * {@link javax.xml.transform.stream.StreamResult},
+ * {@link javax.xml.transform.stax.StAXSource} and
+ * {@link javax.xml.transform.stax.StAXResult}, and
+ * {@link javax.xml.transform.sax.SAXSource} and
+ * {@link javax.xml.transform.sax.SAXResult}, and
+ * {@link javax.xml.transform.dom.DOMSource} and
+ * {@link javax.xml.transform.dom.DOMResult}. Each of these objects defines a
+ * FEATURE string (which is in the form of a URL), which can be passed into
+ * {@link javax.xml.transform.TransformerFactory#getFeature} to see if the given
+ * type of Source or Result object is supported. For instance, to test if a
+ * DOMSource and a StreamResult is supported, you can apply the following test.
+ *
+ * <pre>
+ * <code>
+ * TransformerFactory tfactory = TransformerFactory.newInstance();
+ * if (tfactory.getFeature(DOMSource.FEATURE) &amp;&amp;
+ *     tfactory.getFeature(StreamResult.FEATURE)) {
+ *     ...
+ * }
+ * </code>
+ * </pre>
+ *
+ *
+ * <h3>
+ * <a id="qname-delimiter">Qualified Name Representation</a>
+ * </h3>
+ *
+ * <p>
+ * <a href="http://www.w3.org/TR/REC-xml-names">Namespaces</a> present something
+ * of a problem area when dealing with XML objects. Qualified Names appear in XML
+ * markup as prefixed names. But the prefixes themselves do not hold identity.
+ * Rather, it is the URIs that they contextually map to that hold the identity.
+ * Therefore, when passing a Qualified Name like "xyz:foo" among Java programs,
+ * one must provide a means to map "xyz" to a namespace.
+ *
+ * <p>
+ * One solution has been to create a "QName" object that holds the namespace URI,
+ * as well as the prefix and local name, but this is not always an optimal solution,
+ * as when, for example, you want to use unique strings as keys in a dictionary
+ * object. Not having a string representation also makes it difficult to specify
+ * a namespaced identity outside the context of an XML document.
+ *
+ * <p>
+ * In order to pass namespaced values to transformations, for instance when setting
+ * a property or a parameter on a {@link javax.xml.transform.Transformer} object,
+ * this specification defines that a String "qname" object parameter be passed as
+ * two-part string, the namespace URI enclosed in curly braces ({}), followed by
+ * the local name. If the qname has a null URI, then the String object only
+ * contains the local name. An application can safely check for a non-null URI by
+ * testing to see if the first character of the name is a '{' character.
+ *
+ * <p>
+ * For example, if a URI and local name were obtained from an element defined with
+ * &lt;xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/&gt;, then the
+ * Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that the
+ * prefix is lost.
+ *
+ *
+ * <h3>Result Tree Serialization</h3>
+ *
+ * <p>
+ * Serialization of the result tree to a stream can be controlled with the
+ * {@link javax.xml.transform.Transformer#setOutputProperties} and the
+ * {@link javax.xml.transform.Transformer#setOutputProperty} methods.
+ * These properties only apply to stream results, they have no effect when
+ * the result is a DOM tree or SAX event stream.
+ *
+ * <p>
+ * Strings that match the <a href="http://www.w3.org/TR/xslt#output">XSLT
+ * specification for xsl:output attributes</a> can be referenced from the
+ * {@link javax.xml.transform.OutputKeys} class. Other strings can be
+ * specified as well.
+ * If the transformer does not recognize an output key, a
+ * {@link java.lang.IllegalArgumentException} is thrown, unless the key name
+ * is <a href="#qname-delimiter">namespace qualified</a>. Output key names
+ * that are namespace qualified are always allowed, although they may be
+ * ignored by some implementations.
+ *
+ * <p>
+ * If all that is desired is the simple identity transformation of a
+ * source to a result, then {@link javax.xml.transform.TransformerFactory}
+ * provides a
+ * {@link javax.xml.transform.TransformerFactory#newTransformer()} method
+ * with no arguments. This method creates a Transformer that effectively copies
+ * the source to the result. This method may be used to create a DOM from SAX
+ * events or to create an XML or HTML stream from a DOM or SAX events.
+ *
+ * <h3>Exceptions and Error Reporting</h3>
+ *
+ * <p>
+ * The transformation API throw three types of specialized exceptions. A
+ * {@link javax.xml.transform.TransformerFactoryConfigurationError} is parallel to
+ * the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown
+ * when a configuration problem with the TransformerFactory exists. This error
+ * will typically be thrown when the transformation factory class specified with
+ * the "javax.xml.transform.TransformerFactory" system property cannot be found or
+ * instantiated.
+ *
+ * <p>
+ * A {@link javax.xml.transform.TransformerConfigurationException}
+ * may be thrown if for any reason a Transformer can not be created. A
+ * TransformerConfigurationException may be thrown if there is a syntax error in
+ * the transformation instructions, for example when
+ * {@link javax.xml.transform.TransformerFactory#newTransformer} is
+ * called.
+ *
+ * <p>
+ * {@link javax.xml.transform.TransformerException} is a general
+ * exception that occurs during the course of a transformation. A transformer
+ * exception may wrap another exception, and if any of the
+ * {@link javax.xml.transform.TransformerException#printStackTrace()}
+ * methods are called on it, it will produce a list of stack dumps, starting from
+ * the most recent. The transformer exception also provides a
+ * {@link javax.xml.transform.SourceLocator} object which indicates where
+ * in the source tree or transformation instructions the error occurred.
+ * {@link javax.xml.transform.TransformerException#getMessageAndLocation()}
+ * may be called to get an error message with location info, and
+ * {@link javax.xml.transform.TransformerException#getLocationAsString()}
+ * may be called to get just the location string.
+ *
+ * <p>
+ * Transformation warnings and errors are sent to an
+ * {@link javax.xml.transform.ErrorListener}, at which point the application may
+ * decide to report the error or warning, and may decide to throw an
+ * <code>Exception</code> for a non-fatal error. The <code>ErrorListener</code>
+ * may be set via {@link javax.xml.transform.TransformerFactory#setErrorListener}
+ * for reporting errors that have to do with syntax errors in the transformation
+ * instructions, or via {@link javax.xml.transform.Transformer#setErrorListener}
+ * to report errors that occur during the transformation. The <code>ErrorListener</code>
+ * on both objects will always be valid and non-<code>null</code>, whether set by
+ * the application or a default implementation provided by the processor.
+ * The default implementation provided by the processor will report all warnings
+ * and errors to <code>System.err</code> and does not throw any <code>Exception</code>s.
+ * Applications are <em>strongly</em> encouraged to register and use
+ * <code>ErrorListener</code>s that insure proper behavior for warnings and
+ * errors.
+ *
+ *
+ * <h3>Resolution of URIs within a transformation</h3>
+ *
+ * <p>
+ * The API provides a way for URIs referenced from within the stylesheet
+ * instructions or within the transformation to be resolved by the calling
+ * application. This can be done by creating a class that implements the
+ * {@link javax.xml.transform.URIResolver} interface, with its one method,
+ * {@link javax.xml.transform.URIResolver#resolve}, and use this class to
+ * set the URI resolution for the transformation instructions or transformation
+ * with {@link javax.xml.transform.TransformerFactory#setURIResolver} or
+ * {@link javax.xml.transform.Transformer#setURIResolver}. The
+ * <code>URIResolver.resolve</code> method takes two String arguments, the URI
+ * found in the stylesheet instructions or built as part of the transformation
+ * process, and the base URI against which the first argument will be made absolute
+ * if the absolute URI is required.
+ * The returned {@link javax.xml.transform.Source} object must be usable by
+ * the transformer, as specified in its implemented features.
+ *
+ * @since 1.5
+ */
+
+package javax.xml.transform;
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<html>
-
-<head>
-  <title>javax.xml.transform</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:39 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-
-<body>
-<p>This package defines the generic APIs for processing transformation
-instructions, and performing a transformation from source to result. These
-interfaces have no dependencies on SAX or the DOM standard, and try to make as
-few assumptions as possible about the details of the source and result of a
-transformation. It achieves this by defining
-{@link javax.xml.transform.Source} and
-{@link javax.xml.transform.Result} interfaces.
-</p>
-
-<p>To define concrete classes for the user, the API defines specializations
-of the interfaces found at the root level. These interfaces are found in
-{@link javax.xml.transform.sax}, {@link javax.xml.transform.dom},
-and {@link javax.xml.transform.stream}.
-</p>
-
-
-<h3>Creating Objects</h3>
-
-<p>The API allows a concrete
-{@link javax.xml.transform.TransformerFactory} object to be created from
-the static function
-{@link javax.xml.transform.TransformerFactory#newInstance}.
-</p>
-
-
-<h3>Specification of Inputs and Outputs</h3>
-
-<p>This API defines two interface objects called
-{@link javax.xml.transform.Source} and
-{@link javax.xml.transform.Result}. In order to pass Source and Result
-objects to the interfaces, concrete classes must be used.
-Three concrete representations are defined for each of these
-objects:
-{@link javax.xml.transform.stream.StreamSource} and
-{@link javax.xml.transform.stream.StreamResult},
-{@link javax.xml.transform.sax.SAXSource} and
-{@link javax.xml.transform.sax.SAXResult}, and
-{@link javax.xml.transform.dom.DOMSource} and
-{@link javax.xml.transform.dom.DOMResult}. Each of these objects defines
-a FEATURE string (which is i the form of a URL), which can be passed into
-{@link javax.xml.transform.TransformerFactory#getFeature} to see if the
-given type of Source or Result object is supported. For instance, to test if a
-DOMSource and a StreamResult is supported, you can apply the following
-test.
-</p>
-
-<pre>
-<code>
-TransformerFactory tfactory = TransformerFactory.newInstance();
-if (tfactory.getFeature(DOMSource.FEATURE) &amp;&amp; tfactory.getFeature(StreamResult.FEATURE)) {
-...
-}
-</code>
-</pre>
-
-
-<h3>
-<a id="qname-delimiter">Qualified Name Representation</a>
-</h3>
-
-<p><a href="http://www.w3.org/TR/REC-xml-names">Namespaces</a>
-present something of a problem area when dealing with XML objects. Qualified
-Names appear in XML markup as prefixed names. But the prefixes themselves do
-not hold identity. Rather, it is the URIs that they contextually map to that
-hold the identity. Therefore, when passing a Qualified Name like "xyz:foo"
-among Java programs, one must provide a means to map "xyz" to a namespace.
-</p>
-
-<p>One solution has been to create a "QName" object that holds the
-namespace URI, as well as the prefix and local name, but this is not always an
-optimal solution, as when, for example, you want to use unique strings as keys
-in a dictionary object. Not having a string representation also makes it
-difficult to specify a namespaced identity outside the context of an XML
-document.
-</p>
-
-<p>In order to pass namespaced values to transformations,
-for 
-instance when setting a property or a parameter on a 
-{@link javax.xml.transform.Transformer} object,
-this specification defines that a
-String "qname" object parameter be passed as two-part string, the namespace URI
-enclosed in curly braces ({}), followed by the local name. If the qname has a
-null URI, then the String object only contains the local name. An application
-can safely check for a non-null URI by testing to see if the first character of
-the name is a '{' character.
-</p>
-
-<p>For example, if a URI and local name were obtained from an element
-defined with &lt;xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/&gt;,
-then the Qualified Name would be "{http://xyz.foo.com/yada/baz.html}foo".
-Note that the prefix is lost.
-</p>
-
-
-<h3>Result Tree Serialization</h3>
-
-<p>Serialization of the result tree to a stream can be controlled with
-the {@link javax.xml.transform.Transformer#setOutputProperties} and the
-{@link javax.xml.transform.Transformer#setOutputProperty} methods.
-These properties only apply to stream results, they have no effect when
-the result is a DOM tree or SAX event stream.</p>
-
-<p>Strings that match the <a href="http://www.w3.org/TR/xslt#output">XSLT
-specification for xsl:output attributes</a> can be referenced from the
-{@link javax.xml.transform.OutputKeys} class. Other strings can be
-specified as well.
-If the transformer does not recognize an output key, a
-{@link java.lang.IllegalArgumentException} is thrown, unless the
-key name is <a href="#qname-delimiter">namespace qualified</a>. Output key names
-that are namespace qualified are always allowed, although they may be
-ignored by some implementations.</p>
-
-<p>If all that is desired is the simple identity transformation of a
-source to a result, then {@link javax.xml.transform.TransformerFactory}
-provides a
-{@link javax.xml.transform.TransformerFactory#newTransformer()} method
-with no arguments. This method creates a Transformer that effectively copies
-the source to the result. This method may be used to create a DOM from SAX
-events or to create an XML or HTML stream from a DOM or SAX events.  </p>
-
-<h3>Exceptions and Error Reporting</h3>
-
-<p>The transformation API throw three types of specialized exceptions. A
-{@link javax.xml.transform.TransformerFactoryConfigurationError} is parallel to
-the {@link javax.xml.parsers.FactoryConfigurationError}, and is thrown
-when a configuration problem with the TransformerFactory exists. This error
-will typically be thrown when the transformation factory class specified with
-the "javax.xml.transform.TransformerFactory" system property cannot be found or
-instantiated.</p>
-
-<p>A {@link javax.xml.transform.TransformerConfigurationException}
-may be thrown if for any reason a Transformer can not be created. A
-TransformerConfigurationException may be thrown if there is a syntax error in
-the transformation instructions, for example when
-{@link javax.xml.transform.TransformerFactory#newTransformer} is
-called.</p>
-
-<p>{@link javax.xml.transform.TransformerException} is a general
-exception that occurs during the course of a transformation. A transformer
-exception may wrap another exception, and if any of the
-{@link javax.xml.transform.TransformerException#printStackTrace()}
-methods are called on it, it will produce a list of stack dumps, starting from
-the most recent. The transformer exception also provides a
-{@link javax.xml.transform.SourceLocator} object which indicates where
-in the source tree or transformation instructions the error occurred.
-{@link javax.xml.transform.TransformerException#getMessageAndLocation()}
-may be called to get an error message with location info, and
-{@link javax.xml.transform.TransformerException#getLocationAsString()}
-may be called to get just the location string.</p>
-
-<p>Transformation warnings and errors are sent to an
-{@link javax.xml.transform.ErrorListener}, at which point the
-application may decide to report the error or warning, and may decide to throw
-an <code>Exception</code> for a non-fatal error. The <code>ErrorListener</code> may be set via
-{@link javax.xml.transform.TransformerFactory#setErrorListener} for
-reporting errors that have to do with syntax errors in the transformation
-instructions, or via
-{@link javax.xml.transform.Transformer#setErrorListener} to report
-errors that occur during the transformation. The <code>ErrorListener</code> on both objects
-will always be valid and non-<code>null</code>, whether set by the application or a default
-implementation provided by the processor.
-The default implementation provided by the processor will report all warnings and errors to <code>System.err</code>
-and does not throw any <code>Exception</code>s.
-Applications are <em>strongly</em> encouraged to register and use
-<code>ErrorListener</code>s that insure proper behavior for warnings and
-errors.
-</p>
-
-
-<h3>Resolution of URIs within a transformation</h3>
-
-<p>The API provides a way for URIs referenced from within the stylesheet
-instructions or within the transformation to be resolved by the calling
-application. This can be done by creating a class that implements the
-{@link javax.xml.transform.URIResolver} interface, with its one method,
-{@link javax.xml.transform.URIResolver#resolve}, and use this class to
-set the URI resolution for the transformation instructions or transformation
-with {@link javax.xml.transform.TransformerFactory#setURIResolver} or
-{@link javax.xml.transform.Transformer#setURIResolver}. The
-<code>URIResolver.resolve</code> method takes two String arguments, the URI found in the
-stylesheet instructions or built as part of the transformation process, and the
-base URI 
-against which the first argument will be made absolute if the
-absolute URI is required.
-The returned {@link javax.xml.transform.Source} object must be usable by
-the transformer, as specified in its implemented features.</p>
-
-
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,88 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides SAX specific transformation classes.
+ *
+ * <p>
+ * The {@link javax.xml.transform.sax.SAXSource} class allows the
+ * setting of an {@link org.xml.sax.XMLReader} to be used for pulling
+ * parse events, and an {@link org.xml.sax.InputSource} that may be used to
+ * specify the SAX source.
+ * <p>
+ * The {@link javax.xml.transform.sax.SAXResult} class allows the
+ * setting of a {@link org.xml.sax.ContentHandler} to be the receiver of
+ * SAX2 events from the transformation.
+ * <p>
+ * The {@link javax.xml.transform.sax.SAXTransformerFactory} extends
+ * {@link javax.xml.transform.TransformerFactory} to provide factory
+ * methods for creating {@link javax.xml.transform.sax.TemplatesHandler},
+ * {@link javax.xml.transform.sax.TransformerHandler}, and
+ * {@link org.xml.sax.XMLReader} instances.
+ * <p>
+ * To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory},
+ * the caller must cast the {@link javax.xml.transform.TransformerFactory}
+ * instance returned from
+ * {@link javax.xml.transform.TransformerFactory#newInstance}.
+ *
+ * <p>
+ * The {@link javax.xml.transform.sax.TransformerHandler} interface
+ * allows a transformation to be created from SAX2 parse events, which is a "push"
+ * model rather than the "pull" model that normally occurs for a transformation.
+ * Normal parse events are received through the
+ * {@link org.xml.sax.ContentHandler} interface, lexical events such as
+ * startCDATA and endCDATA are received through the
+ * {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal
+ * the start or end of disabling output escaping are received via
+ * {@link org.xml.sax.ContentHandler#processingInstruction}, with the
+ * target parameter being
+ * {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and
+ * {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If
+ * parameters, output properties, or other features need to be set on the
+ * Transformer handler, a {@link javax.xml.transform.Transformer} reference
+ * will need to be obtained from
+ * {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and
+ * the methods invoked from that reference.
+ *
+ * <p>
+ * The {@link javax.xml.transform.sax.TemplatesHandler} interface
+ * allows the creation of {@link javax.xml.transform.Templates} objects
+ * from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler}
+ * events are complete, the Templates object may be obtained from
+ * {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that
+ * {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should
+ * normally be called in order to establish a base system ID from which relative
+ * URLs may be resolved.
+ * <p>
+ * The {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter}
+ * method allows the creation of a {@link org.xml.sax.XMLFilter}, which
+ * encapsulates the SAX2 notion of a "pull" transformation. The resulting
+ * {@code XMLFilters} can be chained together so that a series of transformations
+ * can happen with one's output becoming another's input.
+ *
+ * @since 1.5
+ */
+
+package javax.xml.transform.sax;
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/sax/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-  <title>javax.xml.transform.sax</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:41 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-
-<body>
-<p>This package implements SAX2-specific transformation APIs. It provides
-  classes which allow input from {@link org.xml.sax.ContentHandler}
-  events, and also classes that produce org.xml.sax.ContentHandler events. It
-  also provides methods to set the input source as an
-  {@link org.xml.sax.XMLReader}, or to use a
-  {@link org.xml.sax.InputSource} as the source. It also allows the
-  creation of a {@link org.xml.sax.XMLFilter}, which enables
-  transformations to "pull" from other transformations, and lets the transformer
-  to be used polymorphically as an {@link org.xml.sax.XMLReader}.</p>
-<p>The {@link javax.xml.transform.sax.SAXSource} class allows the
-  setting of an {@link org.xml.sax.XMLReader} to be used for "pulling"
-  parse events, and an {@link org.xml.sax.InputSource} that may be used to
-  specify the SAX source.</p>
-<p>The {@link javax.xml.transform.sax.SAXResult} class allows the
-  setting of a {@link org.xml.sax.ContentHandler} to be the receiver of
-  SAX2 events from the transformation. 
-<p>The {@link javax.xml.transform.sax.SAXTransformerFactory} extends
-  {@link javax.xml.transform.TransformerFactory} to provide factory
-  methods for creating {@link javax.xml.transform.sax.TemplatesHandler},
-  {@link javax.xml.transform.sax.TransformerHandler}, and
-  {@link org.xml.sax.XMLReader} instances.</p>
-<p>To obtain a {@link javax.xml.transform.sax.SAXTransformerFactory},
-  the caller must cast the {@link javax.xml.transform.TransformerFactory}
-  instance returned from
-  {@link javax.xml.transform.TransformerFactory#newInstance}. 
-
-<p>The {@link javax.xml.transform.sax.TransformerHandler} interface
-  allows a transformation to be created from SAX2 parse events, which is a "push"
-  model rather than the "pull" model that normally occurs for a transformation.
-  Normal parse events are received through the
-  {@link org.xml.sax.ContentHandler} interface, lexical events such as
-  startCDATA and endCDATA are received through the
-  {@link org.xml.sax.ext.LexicalHandler} interface, and events that signal
-  the start or end of disabling output escaping are received via
-  {@link org.xml.sax.ContentHandler#processingInstruction}, with the
-  target parameter being
-  {@link javax.xml.transform.Result#PI_DISABLE_OUTPUT_ESCAPING} and
-  {@link javax.xml.transform.Result#PI_ENABLE_OUTPUT_ESCAPING}. If
-  parameters, output properties, or other features need to be set on the
-  Transformer handler, a {@link javax.xml.transform.Transformer} reference
-  will need to be obtained from
-  {@link javax.xml.transform.sax.TransformerHandler#getTransformer}, and
-  the methods invoked from that reference. 
-
-<p>The {@link javax.xml.transform.sax.TemplatesHandler} interface
-  allows the creation of {@link javax.xml.transform.Templates} objects
-  from SAX2 parse events. Once the {@link org.xml.sax.ContentHandler}
-  events are complete, the Templates object may be obtained from
-  {@link javax.xml.transform.sax.TemplatesHandler#getTemplates}. Note that
-  {@link javax.xml.transform.sax.TemplatesHandler#setSystemId} should
-  normally be called in order to establish a base system ID from which relative
-  URLs may be resolved. 
-<p>The
-  {@link javax.xml.transform.sax.SAXTransformerFactory#newXMLFilter}
-  method allows the creation of a {@link org.xml.sax.XMLFilter}, which
-  encapsulates the SAX2 notion of a "pull" transformation. The following
-  illustrates several transformations chained together. Each filter points to a
-  parent {@link org.xml.sax.XMLReader}, and the final transformation is
-  caused by invoking {@link org.xml.sax.XMLReader#parse} on the final
-  reader in the chain.</p>
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,45 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides StAX specific transformation classes.
+ *
+ * <p>
+ * The {@link javax.xml.transform.stax.StAXSource} class encapsulates a
+ * {@link javax.xml.stream.XMLStreamReader} or {@link javax.xml.stream.XMLEventReader}
+ * and can be used as an input where a {@link javax.xml.transform.Source}
+ * object is accepted.
+ *
+ * <p>
+ * The {@link javax.xml.transform.stax.StAXResult} class encapsulates a
+ * {@link javax.xml.stream.XMLStreamWriter} or {@link javax.xml.stream.XMLEventWriter}
+ * and can be used as an output where a {@link javax.xml.transform.Result}
+ * object is accepted.
+ *
+ *
+ * @since 1.6
+ */
+
+package javax.xml.transform.stax;
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/stax/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<!DOCTYPE html
-    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>javax.xml.transform.stax</title>
-
-        <meta name="CVS"
-              content="$Id: package.html,v 1.2 2005/11/03 19:34:28 jeffsuttor Exp $" />
-        <meta name="AUTHOR"
-              content="Jeff.Suttor@Sun.com" />
-        <meta name="AUTHOR"
-              content="Neeraj.Bajaj@Sun.com" />
-    </head>
-    <body>
-        <p>
-            This package implements StAX-specific transformation APIs. It provides
-            classes which allow input from a StAX reader, that is, 
-            {@link javax.xml.stream.XMLStreamReader} or {@link javax.xml.stream.XMLEventReader}, 
-            and output to a StAX writer, that is, 
-            {@link javax.xml.stream.XMLStreamWriter} or {@link javax.xml.stream.XMLEventWriter}.
-        </p>
-        <p>
-            The {@link javax.xml.transform.stax.StAXSource} class encapsulates a 
-            {@link javax.xml.stream.XMLStreamReader} or {@link javax.xml.stream.XMLEventReader} 
-            and can be used as an input where a {@link javax.xml.transform.Source}
-            object is accepted.
-        </p>
-        <p>
-            The {@link javax.xml.transform.stax.StAXResult} class encapsulates a 
-            {@link javax.xml.stream.XMLStreamWriter} or {@link javax.xml.stream.XMLEventWriter} 
-            and can be used as an output where a {@link javax.xml.transform.Result}
-            object is accepted.
-        </p>
-
-        @since 1.6
-    </body>
-</html>
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,56 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides stream and URI specific transformation classes.
+ *
+ * <p>
+ * The {@link javax.xml.transform.stream.StreamSource} class
+ * provides methods for specifying {@link java.io.InputStream} input,
+ * {@link java.io.Reader} input, and URL input in the form of strings. Even
+ * if an input stream or reader is specified as the source,
+ * {@link javax.xml.transform.stream.StreamSource#setSystemId} should still
+ * be called, so that the transformer can know from where it should resolve
+ * relative URIs. The public identifier is always optional: if the application
+ * writer includes one, it will be provided as part of the
+ * {@link javax.xml.transform.SourceLocator} information.
+ * <p>
+ * The {@link javax.xml.transform.stream.StreamResult} class
+ * provides methods for specifying {@link java.io.OutputStream},
+ * {@link java.io.Writer}, or an output system ID, as the output of the
+ * transformation result.
+ * <p>
+ * Normally streams should be used rather than readers or writers, for
+ * both the Source and Result, since readers and writers already have the encoding
+ * established to and from the internal Unicode format. However, there are times
+ * when it is useful to write to a character stream, such as when using a
+ * StringWriter in order to write to a String, or in the case of reading source
+ * XML from a StringReader.
+ *
+ *
+ * @since 1.5
+ */
+
+package javax.xml.transform.stream;
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/stream/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<!DOCTYPE html
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-  <title>javax.xml.transform.stream</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:42 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-<body>
-<p>This package implements stream- and URI- specific transformation APIs.
-	 </p>
-<p>The {@link javax.xml.transform.stream.StreamSource} class
-	 provides methods for specifying {@link java.io.InputStream} input,
-	 {@link java.io.Reader} input, and URL input in the form of strings. Even
-	 if an input stream or reader is specified as the source,
-	 {@link javax.xml.transform.stream.StreamSource#setSystemId} should still
-	 be called, so that the transformer can know from where it should resolve
-	 relative URIs. The public identifier is always optional: if the application
-	 writer includes one, it will be provided as part of the
-	 {@link javax.xml.transform.SourceLocator} information.</p>
-<p>The {@link javax.xml.transform.stream.StreamResult} class
-	 provides methods for specifying {@link java.io.OutputStream},
-	 {@link java.io.Writer}, or an output system ID, as the output of the
-	 transformation result.</p>
-<p>Normally streams should be used rather than readers or writers, for
-	 both the Source and Result, since readers and writers already have the encoding
-	 established to and from the internal Unicode format. However, there are times
-	 when it is useful to write to a character stream, such as when using a
-	 StringWriter in order to write to a String, or in the case of reading source
-	 XML from a StringReader.</p>
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/validation/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,133 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <p>
+ * Provides an API for validation of XML documents.  <em>Validation</em> is the
+ * process of verifying that an XML document is an instance of a specified XML
+ * <em>schema</em>.  An XML schema defines the content model (also called a
+ * <em>grammar</em> or <em>vocabulary</em>) that its instance documents will
+ * represent.
+ *
+ * <p>
+ * There are a number of popular technologies available for creating an XML schema.
+ * Some of the most popular ones include:
+ *
+ * <ul>
+ *     <li><strong>Document Type Definition (DTD)</strong>
+ *         - XML's built-in schema language.
+ *     </li>
+ *     <li><strong><a href="http://www.w3.org/XML/Schema">W3C XML Schema (WXS)</a></strong> -
+ *         an object-oriented XML schema language. WXS also provides a type system
+ *         for constraining the character data of an XML document. WXS is maintained
+ *         by the <a href="http://www.w3.org">World Wide Web Consortium (W3C)</a>
+ *         and is a W3C Recommendation (that is, a ratified W3C standard specification).
+ *     </li>
+ *     <li><strong><a href="http://www.relaxng.org">RELAX NG (RNG)</a></strong> -
+ *         a pattern-based, user-friendly XML schema language. RNG schemas may
+ *         also use types to constrain XML character data. RNG is maintained by
+ *         the <a href="http://www.oasis-open.org">Organization for the Advancement
+ *         of Structured Information Standards (OASIS)</a> and is both an OASIS
+ *         and an <a href="http://www.iso.org">ISO (International Organization
+ *         for Standardization)</a> standard.
+ *     </li>
+ *     <li><strong><a href="http://www.schematron.com/">Schematron</a></strong> -
+ *         a rules-based XML schema language. Whereas DTD, WXS, and RNG are designed
+ *         to express the structure of a content model, Schematron is designed to
+ *         enforce individual rules that are difficult or impossible to express
+ *         with other schema languages. Schematron is intended to supplement a
+ *         schema written in structural schema language such as the aforementioned.
+ *         Schematron is in the process of becoming an ISO standard.
+ *     </li>
+ * </ul>
+ * <p>
+ * While JAXP supports validation as a feature of an XML parser, represented by
+ * either a {@link javax.xml.parsers.SAXParser} or {@link javax.xml.parsers.DocumentBuilder}
+ * instance, the {@code Validation} API is preferred.
+ *
+ * <p>
+ * The JAXP validation API decouples the validation of an instance document from
+ * the parsing of an XML document. This is advantageous for several reasons,
+ * some of which are:
+ *
+ * <ul>
+ *     <li><strong>Support for additional schema langauges.</strong>
+ *         The JAXP parser implementations support only a subset of the available
+ *         XML schema languages. The Validation API provides a standard mechanism
+ *         through which applications may take of advantage of specialization
+ *         validation libraries which support additional schema languages.
+ *     </li>
+ *     <li><strong>Easy runtime coupling of an XML instance and schema.</strong>
+ *         Specifying the location of a schema to use for validation with JAXP
+ *         parsers can be confusing. The Validation API makes this process simple
+ *         (see <a href="#example-1">example</a> below).
+ *     </li>
+ * </ul>
+ * <p>
+ * <a id="example-1"><strong>Usage example</strong>.</a> The following example
+ * demonstrates validating an XML document with the Validation API
+ * (for readability, some exception handling is not shown):
+ *
+ * <pre>
+ *
+ *     // parse an XML document into a DOM tree
+ *     DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ *     Document document = parser.parse(new File("instance.xml"));
+ *
+ *     // create a SchemaFactory capable of understanding WXS schemas
+ *     SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ *
+ *     // load a WXS schema, represented by a Schema instance
+ *     Source schemaFile = new StreamSource(new File("mySchema.xsd"));
+ *     Schema schema = factory.newSchema(schemaFile);
+ *
+ *     // create a Validator instance, which can be used to validate an instance document
+ *     Validator validator = schema.newValidator();
+ *
+ *     // validate the DOM tree
+ *     try {
+ *         validator.validate(new DOMSource(document));
+ *     } catch (SAXException e) {
+ *         // instance document is invalid!
+ *     }
+ * </pre>
+ * <p>
+ * The JAXP parsing API has been integrated with the Validation API. Applications
+ * may create a {@link javax.xml.validation.Schema} with the validation API
+ * and associate it with a {@link javax.xml.parsers.DocumentBuilderFactory} or
+ * a {@link javax.xml.parsers.SAXParserFactory} instance by using the
+ * {@link javax.xml.parsers.DocumentBuilderFactory#setSchema(Schema)} and
+ * {@link javax.xml.parsers.SAXParserFactory#setSchema(Schema)} methods.
+ * <strong>You should not</strong> both set a schema and call <code>setValidating(true)</code>
+ * on a parser factory. The former technique will cause parsers to use the new
+ * validation API; the latter will cause parsers to use their own internal validation
+ * facilities. <strong>Turning on both of these options simultaneously will cause
+ * either redundant behavior or error conditions.</strong>
+ *
+ *
+ * @since 1.5
+ */
+
+package javax.xml.validation;
--- a/jaxp/src/java.xml/share/classes/javax/xml/validation/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-
-<html>
-
-<head>
-  <title>javax.xml.validation</title>
-
-  <meta name="CVS"
-        content="$Id: package.html,v 1.2 2005/06/10 03:50:43 jeffsuttor Exp $" />
-  <meta name="AUTHOR"
-        content="Jeff.Suttor@Sun.com" />
-</head>
-	<body>
-		<p>
-		    This package provides an API for validation of XML documents.  <em>Validation</em> is the process of verifying
-		    that an XML document is an instance of a specified XML <em>schema</em>.  An XML schema defines the
-		    content model (also called a <em>grammar</em> or <em>vocabulary</em>) that its instance documents
-		    will represent.
-        </p>
-        <p>
-            There are a number of popular technologies available for creating an XML schema. Some of the most
-            popular include:
-		</p>
-            <ul>
-                <li><strong>Document Type Definition (DTD)</strong> - XML's built-in schema language.</li>
-                <li><strong><a href="http://www.w3.org/XML/Schema">W3C XML Schema (WXS)</a></strong> - an object-oriented XML schema
-                    language. WXS also provides a type system for constraining the character data of an XML document.
-                    WXS is maintained by the <a href="http://www.w3.org">World Wide Web Consortium (W3C)</a> and is a W3C
-                    Recommendation (that is, a ratified W3C standard specification).</li>
-                <li><strong><a href="http://www.relaxng.org">RELAX NG (RNG)</a></strong> - a pattern-based,
-                    user-friendly XML schema language. RNG schemas may also use types to constrain XML character data.
-                    RNG is maintained by the <a href="http://www.oasis-open.org">Organization for the Advancement of
-                    Structured Information Standards (OASIS)</a> and is both an OASIS and an
-                    <a href="http://www.iso.org">ISO (International Organization for Standardization)</a> standard.</li>
-                <li><strong><a href="http://www.schematron.com/">Schematron</a></strong> - a rules-based XML schema
-                language. Whereas DTD, WXS, and RNG are designed to express the structure of a content model,
-                Schematron is designed to enforce individual rules that are difficult or impossible to express
-                with other schema languages. Schematron is intended to supplement a schema written in
-                structural schema language such as the aforementioned. Schematron is in the process
-                of becoming an ISO standard.</li>
-            </ul>
-        <p>
-		    Previous versions of JAXP supported validation as a feature of an XML parser, represented by
-		    either a {@link javax.xml.parsers.SAXParser} or {@link javax.xml.parsers.DocumentBuilder} instance.
-        </p>
-        <p>
-		    The JAXP validation API decouples the validation of an instance document from the parsing of an
-		    XML document. This is advantageous for several reasons, some of which are:
-		</p>
-		    <ul>
-		        <li><strong>Support for additional schema langauges.</strong> As of JDK 1.5, the two most
-		        popular JAXP parser implementations, Crimson and Xerces, only support a subset of the available
-		        XML schema languages. The Validation API provides a standard mechanism through which applications
-		        may take of advantage of specialization validation libraries which support additional schema
-		        languages.</li>
-		        <li><strong>Easy runtime coupling of an XML instance and schema.</strong> Specifying the location
-		        of a schema to use for validation with JAXP parsers can be confusing. The Validation API makes this
-		        process simple (see <a href="#example-1">example</a> below).</li>
-          </ul>
-		<p>
-            <a id="example-1"><strong>Usage example</strong>.</a> The following example demonstrates validating
-            an XML document with the Validation API (for readability, some exception handling is not shown):
-		</p>
-            <pre>
-            
-    // parse an XML document into a DOM tree
-    DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-    Document document = parser.parse(new File("instance.xml"));
-
-    // create a SchemaFactory capable of understanding WXS schemas
-    SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-
-    // load a WXS schema, represented by a Schema instance
-    Source schemaFile = new StreamSource(new File("mySchema.xsd"));
-    Schema schema = factory.newSchema(schemaFile);
-
-    // create a Validator instance, which can be used to validate an instance document
-    Validator validator = schema.newValidator();
-
-    // validate the DOM tree
-    try {
-        validator.validate(new DOMSource(document));
-    } catch (SAXException e) {
-        // instance document is invalid!
-    }
-</pre>
-		<p>
-		    The JAXP parsing API has been integrated with the Validation API. Applications may create a {@link javax.xml.validation.Schema} with the validation API
-		    and associate it with a {@link javax.xml.parsers.DocumentBuilderFactory} or a {@link javax.xml.parsers.SAXParserFactory} instance
-		    by using the {@link javax.xml.parsers.DocumentBuilderFactory#setSchema(Schema)} and {@link javax.xml.parsers.SAXParserFactory#setSchema(Schema)}
-		    methods. <strong>You should not</strong> both set a schema and call <code>setValidating(true)</code> on a parser factory. The former technique
-		    will cause parsers to use the new validation API; the latter will cause parsers to use their own internal validation
-		    facilities. <strong>Turning on both of these options simultaneously will cause either redundant behavior or error conditions.</strong>
-        </p>
-	</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/javax/xml/xpath/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,401 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ * Provides an <em>object-model neutral</em> API for the
+ * evaluation of XPath expressions and access to the evaluation
+ * environment.
+ *
+ * <p>
+ * The XPath API supports <a href="http://www.w3.org/TR/xpath">
+ *     XML Path Language (XPath) Version 1.0</a>
+ *
+ * <hr>
+ *
+ * <ul>
+ *     <li><a href='#XPath.Overview'>1. XPath Overview</a></li>
+ *     <li><a href='#XPath.Expressions'>2. XPath Expressions</a></li>
+ *     <li><a href='#XPath.Datatypes'>3. XPath Data Types</a>
+ *         <ul>
+ *             <li><a href='#XPath.Datatypes.QName'>3.1 QName Types</a>
+ *             <li><a href='#XPath.Datatypes.Class'>3.2 Class Types</a>
+ *             <li><a href='#XPath.Datatypes.Enum'>3.3 Enum Types</a>
+ *         </ul>
+ *     </li>
+ *     <li><a href='#XPath.Context'>4. XPath Context</a></li>
+ *     <li><a href='#XPath.Use'>5. Using the XPath API</a></li>
+ * </ul>
+ * <p>
+ * <a id="XPath.Overview"></a>
+ * <h3>1. XPath Overview</h3>
+ *
+ * <p>
+ * The XPath language provides a simple, concise syntax for selecting
+ * nodes from an XML document. XPath also provides rules for converting a
+ * node in an XML document object model (DOM) tree to a boolean, double,
+ * or string value. XPath is a W3C-defined language and an official W3C
+ * recommendation; the W3C hosts the XML Path Language (XPath) Version
+ * 1.0 specification.
+ *
+ *
+ * <p>
+ * XPath started in life in 1999 as a supplement to the XSLT and
+ * XPointer languages, but has more recently become popular as a
+ * stand-alone language, as a single XPath expression can be used to
+ * replace many lines of DOM API code.
+ *
+ *
+ * <a id="XPath.Expressions"></a>
+ * <h3>2. XPath Expressions</h3>
+ *
+ * <p>
+ * An XPath <em>expression</em> is composed of a <em>location
+ * path</em> and one or more optional <em>predicates</em>. Expressions
+ * may also include XPath variables.
+ *
+ *
+ * <p>
+ * The following is an example of a simple XPath expression:
+ *
+ * <blockquote>
+ * <pre>
+ *     /foo/bar
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * This example would select the <code>&lt;bar&gt;</code> element in
+ * an XML document such as the following:
+ *
+ * <blockquote>
+ * <pre>
+ *     &lt;foo&gt;
+ *         &lt;bar/&gt;
+ *     &lt;/foo&gt;
+ * </pre>
+ * </blockquote>
+ *
+ * <p>The expression <code>/foo/bar</code> is an example of a location
+ * path. While XPath location paths resemble Unix-style file system
+ * paths, an important distinction is that XPath expressions return
+ * <em>all</em> nodes that match the expression. Thus, all three
+ * <code>&lt;bar&gt;</code> elements in the following document would be
+ * selected by the <code>/foo/bar</code> expression:
+ *
+ * <blockquote>
+ * <pre>
+ *     &lt;foo&gt;
+ *         &lt;bar/&gt;
+ *         &lt;bar/&gt;
+ *         &lt;bar/&gt;
+ *     &lt;/foo&gt;
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * A special location path operator, <code>//</code>, selects nodes at
+ * any depth in an XML document. The following example selects all
+ * <code>&lt;bar&gt;</code> elements regardless of their location in a
+ * document:
+ *
+ * <blockquote>
+ * <pre>
+ *     //bar
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * A wildcard operator, *, causes all element nodes to be selected.
+ * The following example selects all children elements of a
+ * <code>&lt;foo&gt;</code> element:
+ *
+ * <blockquote>
+ * <pre>
+ *     /foo/*
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * In addition to element nodes, XPath location paths may also address
+ * attribute nodes, text nodes, comment nodes, and processing instruction
+ * nodes. The following table gives examples of location paths for each
+ * of these node types:
+ *
+ * <table class="striped">
+ *     <caption>Examples of Location Path</caption>
+ *     <thead>
+ *         <tr>
+ *             <th>Location Path</th>
+ *             <th>Description</th>
+ *         </tr>
+ *     </thead>
+ *     <tbody>
+ *         <tr>
+ *             <td>
+ *                 <code>/foo/bar/<strong>@id</strong></code>
+ *             </td>
+ *             <td>
+ *                 Selects the attribute <code>id</code> of the <code>&lt;bar&gt;</code> element
+ *             </td>
+ *         </tr>
+ *         <tr>
+ *             <td><code>/foo/bar/<strong>text()</strong></code>
+ *             </td>
+ *             <td>
+ *                 Selects the text nodes of the <code>&lt;bar&gt;</code> element. No
+ *                 distinction is made between escaped and non-escaped character data.
+ *             </td>
+ *         </tr>
+ *         <tr>
+ *             <td><code>/foo/bar/<strong>comment()</strong></code>
+ *             </td>
+ *             <td>
+ *                 Selects all comment nodes contained in the <code>&lt;bar&gt;</code> element.
+ *             </td>
+ *         </tr>
+ *         <tr>
+ *             <td><code>/foo/bar/<strong>processing-instruction()</strong></code>
+ *             </td>
+ *             <td>
+ *                 Selects all processing-instruction nodes contained in the
+ *                 <code>&lt;bar&gt;</code> element.
+ *             </td>
+ *         </tr>
+ *     </tbody>
+ * </table>
+ *
+ * <p>
+ * Predicates allow for refining the nodes selected by an XPath
+ * location path. Predicates are of the form
+ * <code>[<em>expression</em>]</code>. The following example selects all
+ * <code>&lt;foo&gt;</code> elements that contain an <code>include</code>
+ * attribute with the value of <code>true</code>:
+ *
+ * <blockquote>
+ * <pre>
+ *     //foo[@include='true']
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * Predicates may be appended to each other to further refine an
+ * expression, such as:
+ *
+ * <blockquote>
+ * <pre>
+ *     //foo[@include='true'][@mode='bar']
+ * </pre>
+ * </blockquote>
+ *
+ * <a id="XPath.Datatypes"></a>
+ * <h3>3. XPath Data Types</h3>
+ *
+ * <p>
+ * While XPath expressions select nodes in the XML document, the XPath
+ * API allows the selected nodes to be coalesced into one of the
+ * following data types:
+ *
+ * <ul>
+ *     <li><code>Boolean</code></li>
+ *     <li><code>Number</code></li>
+ *     <li><code>String</code></li>
+ * </ul>
+ *
+ * <a id="XPath.Datatypes.QName"></a>
+ * <h3>3.1 QName types</h3>
+ * The XPath API defines the following {@link javax.xml.namespace.QName} types to
+ * represent return types of an XPath evaluation:
+ * <ul>
+ *     <li>{@link javax.xml.xpath.XPathConstants#NODESET}</li>
+ *     <li>{@link javax.xml.xpath.XPathConstants#NODE}</li>
+ *     <li>{@link javax.xml.xpath.XPathConstants#STRING}</li>
+ *     <li>{@link javax.xml.xpath.XPathConstants#BOOLEAN}</li>
+ *     <li>{@link javax.xml.xpath.XPathConstants#NUMBER}</li>
+ * </ul>
+ *
+ * <p>
+ * The return type is specified by a {@link javax.xml.namespace.QName} parameter
+ * in method call used to evaluate the expression, which is either a call to
+ * <code>XPathExpression.evalute(...)</code> or <code>XPath.evaluate(...)</code>
+ * methods.
+ *
+ * <p>
+ * When a <code>Boolean</code> return type is requested,
+ * <code>Boolean.TRUE</code> is returned if one or more nodes were
+ * selected; otherwise, <code>Boolean.FALSE</code> is returned.
+ *
+ * <p>
+ * The <code>String</code> return type is a convenience for retrieving
+ * the character data from a text node, attribute node, comment node, or
+ * processing-instruction node. When used on an element node, the value
+ * of the child text nodes is returned.
+ *
+ * <p>
+ * The <code>Number</code> return type attempts to coalesce the text
+ * of a node to a <code>double</code> data type.
+ *
+ * <a id="XPath.Datatypes.Class"></a>
+ * <h3>3.2 Class types</h3>
+ * In addition to the QName types, the XPath API supports the use of Class types
+ * through the <code>XPathExpression.evaluteExpression(...)</code> or
+ * <code>XPath.evaluateExpression(...)</code> methods.
+ *
+ * The XPath data types are mapped to Class types as follows:
+ * <ul>
+ *     <li><code>Boolean</code> -- <code>Boolean.class</code></li>
+ *     <li><code>Number</code> -- <code>Number.class</code></li>
+ *     <li><code>String</code> -- <code>String.class</code></li>
+ *     <li><code>Nodeset</code> -- <code>XPathNodes.class</code></li>
+ *     <li><code>Node</code> -- <code>Node.class</code></li>
+ * </ul>
+ *
+ * <p>
+ * Of the subtypes of Number, only Double, Integer and Long are supported.
+ *
+ * <a id="XPath.Datatypes.Enum"></a>
+ * <h3>3.3 Enum types</h3>
+ * Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType}
+ * that provide mappings between the QName and Class types above. The result of
+ * evaluating an expression using the <code>XPathExpression.evaluteExpression(...)</code>
+ * or <code>XPath.evaluateExpression(...)</code> methods will be of one of these types.
+ *
+ * <a id="XPath.Context"></a>
+ * <h3>4. XPath Context</h3>
+ *
+ * <p>
+ * XPath location paths may be relative to a particular node in the
+ * document, known as the <code>context</code>. A context consists of:
+ * <ul>
+ *     <li>a node (the context node)</li>
+ *     <li>a pair of non-zero positive integers (the context position and the context size)</li>
+ *     <li>a set of variable bindings</li>
+ *     <li>a function library</li>
+ *     <li>the set of namespace declarations in scope for the expression</li>
+ * </ul>
+ *
+ * <p>
+ * It is an XML document tree represented as a hierarchy of nodes, a
+ * {@link org.w3c.dom.Node} for example, in the JDK implementation.
+ *
+ * <a id="XPath.Use"></a>
+ * <h3>5. Using the XPath API</h3>
+ *
+ * Consider the following XML document:
+ * <blockquote>
+ * <pre>
+ * &lt;widgets&gt;
+ * &lt;widget&gt;
+ * &lt;manufacturer/&gt;
+ * &lt;dimensions/&gt;
+ * &lt;/widget&gt;
+ * &lt;/widgets&gt;
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * The <code>&lt;widget&gt;</code> element can be selected with the following process:
+ *
+ * <blockquote>
+ * <pre>
+ *     // parse the XML as a W3C Document
+ *     DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ *     Document document = builder.parse(new File("/widgets.xml"));
+ *
+ *     //Get an XPath object and evaluate the expression
+ *     XPath xpath = XPathFactory.newInstance().newXPath();
+ *     String expression = "/widgets/widget";
+ *     Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
+ *
+ *     //or using the evaluateExpression method
+ *     Node widgetNode = xpath.evaluateExpression(expression, document, Node.class);
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * With a reference to the <code>&lt;widget&gt;</code> element, a
+ * relative XPath expression can be written to select the
+ * <code>&lt;manufacturer&gt;</code> child element:
+ *
+ * <blockquote>
+ * <pre>
+ *     XPath xpath = XPathFactory.newInstance().newXPath();
+ *     String expression = <b>"manufacturer";</b>
+ *     Node manufacturerNode = (Node) xpath.evaluate(expression, <b>widgetNode</b>, XPathConstants.NODE);
+ *
+ *     //or using the evaluateExpression method
+ *     Node manufacturerNode = xpath.evaluateExpression(expression, <b>widgetNode</b>, Node.class);
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * In the above example, the XML file is read into a DOM Document before being passed
+ * to the XPath API. The following code demonstrates the use of InputSource to
+ * leave it to the XPath implementation to process it:
+ *
+ * <blockquote>
+ * <pre>
+ *     XPath xpath = XPathFactory.newInstance().newXPath();
+ *     String expression = "/widgets/widget";
+ *     InputSource inputSource = new InputSource("widgets.xml");
+ *     NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
+ *
+ *     //or using the evaluateExpression method
+ *     XPathNodes nodes = xpath.evaluate(expression, inputSource, XPathNodes.class);
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * In the above cases, the type of the expected results are known. In case where
+ * the result type is unknown or any type, the {@link javax.xml.xpath.XPathEvaluationResult}
+ * may be used to determine the return type. The following code demonstrates the usage:
+ * <blockquote>
+ * <pre>
+ *     XPathEvaluationResult&lt;?&gt; result = xpath.evaluateExpression(expression, document);
+ *     switch (result.type()) {
+ *         case NODESET:
+ *             XPathNodes nodes = (XPathNodes)result.value();
+ *             ...
+ *             break;
+ *     }
+ * </pre>
+ * </blockquote>
+ *
+ * <p>
+ * The XPath 1.0 Number data type is defined as a double. However, the XPath
+ * specification also provides functions that returns Integer type. To facilitate
+ * such operations, the XPath API allows Integer and Long to be used in
+ * {@code evaluateExpression} method such as the following code:
+ * <blockquote>
+ * <pre>
+ *     int count = xpath.evaluate("count(/widgets/widget)", document, Integer.class);
+ * </pre>
+ * </blockquote>
+ *
+ * @since 1.5
+ *
+ */
+
+package javax.xml.xpath;
--- a/jaxp/src/java.xml/share/classes/javax/xml/xpath/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<!--
-Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions. 
--->
-</head>
-<body>
-
-This package provides an <em>object-model neutral</em> API for the
-evaluation of XPath expressions and access to the evaluation
-environment.
-
-<p>
-The XPath API supports <a href="http://www.w3.org/TR/xpath">
-    XML Path Language (XPath) Version 1.0</a>
-
-<hr>
-
-<ul>
-    <li><a href='#XPath.Overview'>1. XPath Overview</a></li>
-    <li><a href='#XPath.Expressions'>2. XPath Expressions</a></li>
-    <li><a href='#XPath.Datatypes'>3. XPath Data Types</a>
-        <ul>
-            <li><a href='#XPath.Datatypes.QName'>3.1 QName Types</a>
-            <li><a href='#XPath.Datatypes.Class'>3.2 Class Types</a>
-            <li><a href='#XPath.Datatypes.Enum'>3.3 Enum Types</a>
-        </ul>    
-    </li>
-    <li><a href='#XPath.Context'>4. XPath Context</a></li>
-    <li><a href='#XPath.Use'>5. Using the XPath API</a></li>
-</ul>
-<p>
-<a id="XPath.Overview"></a>
-<h3>1. XPath Overview</h3>
-
-<p>The XPath language provides a simple, concise syntax for selecting
-nodes from an XML document. XPath also provides rules for converting a
-node in an XML document object model (DOM) tree to a boolean, double,
-or string value. XPath is a W3C-defined language and an official W3C
-recommendation; the W3C hosts the XML Path Language (XPath) Version
-1.0 specification.
-</p>
-
-<p>XPath started in life in 1999 as a supplement to the XSLT and
-XPointer languages, but has more recently become popular as a
-stand-alone language, as a single XPath expression can be used to
-replace many lines of DOM API code.
-</p>
-
-<a id="XPath.Expressions"></a>
-<h3>2. XPath Expressions</h3>
-
-<p>An XPath <em>expression</em> is composed of a <em>location
-path</em> and one or more optional <em>predicates</em>. Expressions
-may also include XPath variables.
-</p>
-
-<p>The following is an example of a simple XPath expression:</p>
-
-<blockquote>
-<pre>
-/foo/bar
-</pre>
-</blockquote>
-
-<p>This example would select the <code>&lt;bar&gt;</code> element in
-an XML document such as the following:</p>
-
-<blockquote>
-<pre>
-&lt;foo&gt;
-    &lt;bar/&gt;
-&lt;/foo&gt;
-</pre>
-</blockquote>
-
-<p>The expression <code>/foo/bar</code> is an example of a location
-path. While XPath location paths resemble Unix-style file system
-paths, an important distinction is that XPath expressions return
-<em>all</em> nodes that match the expression. Thus, all three
-<code>&lt;bar&gt;</code> elements in the following document would be
-selected by the <code>/foo/bar</code> expression:</p>
-
-<blockquote>
-<pre>
-&lt;foo&gt;
-    &lt;bar/&gt;
-    &lt;bar/&gt;
-    &lt;bar/&gt;
-&lt;/foo&gt;
-</pre>
-</blockquote>
-
-<p>A special location path operator, <code>//</code>, selects nodes at
-any depth in an XML document. The following example selects all
-<code>&lt;bar&gt;</code> elements regardless of their location in a
-document:</p>
-
-<blockquote>
-<pre>
-//bar
-</pre>
-</blockquote>
-
-<p>A wildcard operator, *, causes all element nodes to be selected.
-The following example selects all children elements of a
-<code>&lt;foo&gt;</code> element:
-
-<blockquote>
-<pre>
-/foo/*
-</pre>
-</blockquote>
-
-<p>In addition to element nodes, XPath location paths may also address
-attribute nodes, text nodes, comment nodes, and processing instruction
-nodes. The following table gives examples of location paths for each
-of these node types:</p>
-
-<table class="striped">
-<caption>Examples of Location Path</caption>
-<thead>
-<tr>
-<th>Location Path</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>
-<code>/foo/bar/<strong>@id</strong></code>
-</td>
-<td>Selects the attribute <code>id</code> of the <code>&lt;bar&gt;</code> element
-</td>
-</tr>
-<tr>
-<td><code>/foo/bar/<strong>text()</strong></code>
-</td>
-<td>Selects the text nodes of the <code>&lt;bar&gt;</code> element. No
-distinction is made between escaped and non-escaped character data.
-</td>
-</tr>
-<tr>
-<td><code>/foo/bar/<strong>comment()</strong></code>
-</td>
-<td>Selects all comment nodes contained in the <code>&lt;bar&gt;</code> element.
-</td>
-</tr>
-<tr>
-<td><code>/foo/bar/<strong>processing-instruction()</strong></code>
-</td>
-<td>Selects all processing-instruction nodes contained in the
-<code>&lt;bar&gt;</code> element.
-</td>
-</tr>
-</tbody>
-</table>
-
-<p>Predicates allow for refining the nodes selected by an XPath
-location path. Predicates are of the form
-<code>[<em>expression</em>]</code>. The following example selects all
-<code>&lt;foo&gt;</code> elements that contain an <code>include</code>
-attribute with the value of <code>true</code>:</p>
-
-<blockquote>
-<pre>
-//foo[@include='true']
-</pre>
-</blockquote>
-
-<p>Predicates may be appended to each other to further refine an
-expression, such as:</p>
-
-<blockquote>
-<pre>
-//foo[@include='true'][@mode='bar']
-</pre>
-</blockquote>
-
-<a id="XPath.Datatypes"></a>
-<h3>3. XPath Data Types</h3>
-
-<p>While XPath expressions select nodes in the XML document, the XPath
-API allows the selected nodes to be coalesced into one of the
-following data types:</p>
-
-<ul>
-<li><code>Boolean</code></li>
-<li><code>Number</code></li>
-<li><code>String</code></li>
-</ul>
-
-<a id="XPath.Datatypes.QName"></a>
-<h3>3.1 QName types</h3>
-The XPath API defines the following {@link javax.xml.namespace.QName} types to 
-represent return types of an XPath evaluation:
-<ul>
-<li>{@link javax.xml.xpath.XPathConstants#NODESET}</li>
-<li>{@link javax.xml.xpath.XPathConstants#NODE}</li>
-<li>{@link javax.xml.xpath.XPathConstants#STRING}</li>
-<li>{@link javax.xml.xpath.XPathConstants#BOOLEAN}</li>
-<li>{@link javax.xml.xpath.XPathConstants#NUMBER}</li>
-</ul>
-
-<p>The return type is specified by a {@link javax.xml.namespace.QName} parameter 
-in method call used to evaluate the expression, which is either a call to
-<code>XPathExpression.evalute(...)</code> or <code>XPath.evaluate(...)</code> 
-methods. 
-
-<p>When a <code>Boolean</code> return type is requested,
-<code>Boolean.TRUE</code> is returned if one or more nodes were
-selected; otherwise, <code>Boolean.FALSE</code> is returned.
-
-<p>The <code>String</code> return type is a convenience for retrieving
-the character data from a text node, attribute node, comment node, or
-processing-instruction node. When used on an element node, the value
-of the child text nodes is returned.
-
-<p>The <code>Number</code> return type attempts to coalesce the text
-of a node to a <code>double</code> data type.
-
-<a id="XPath.Datatypes.Class"></a>
-<h3>3.2 Class types</h3>
-In addition to the QName types, the XPath API supports the use of Class types
-through the <code>XPathExpression.evaluteExpression(...)</code> or 
-<code>XPath.evaluateExpression(...)</code> methods. 
-
-The XPath data types are mapped to Class types as follows:
-<ul>
-<li><code>Boolean</code> -- <code>Boolean.class</code></li>
-<li><code>Number</code> -- <code>Number.class</code></li>
-<li><code>String</code> -- <code>String.class</code></li>
-<li><code>Nodeset</code> -- <code>XPathNodes.class</code></li>
-<li><code>Node</code> -- <code>Node.class</code></li>
-</ul>
-
-<p>
-Of the subtypes of Number, only Double, Integer and Long are supported.
-         
-<a id="XPath.Datatypes.Enum"></a>
-<h3>3.3 Enum types</h3>
-Enum types are defined in {@link javax.xml.xpath.XPathEvaluationResult.XPathResultType} 
-that provide mappings between the QName and Class types above. The result of 
-evaluating an expression using the <code>XPathExpression.evaluteExpression(...)</code> 
-or <code>XPath.evaluateExpression(...)</code> methods will be of one of these types.
-
-<a id="XPath.Context"></a>
-<h3>4. XPath Context</h3>
-
-<p>XPath location paths may be relative to a particular node in the
-document, known as the <code>context</code>. A context consists of:
-<ul>
-    <li>a node (the context node)</li>
-    <li>a pair of non-zero positive integers (the context position and the context size)</li>
-    <li>a set of variable bindings</li>
-    <li>a function library</li>
-    <li>the set of namespace declarations in scope for the expression</li>    
-</ul>
-
-<p>
-It is an XML document tree represented as a hierarchy of nodes, a 
-{@link org.w3c.dom.Node} for example, in the JDK implementation.
-
-<a id="XPath.Use"></a>
-<h3>5. Using the XPath API</h3>
-
-Consider the following XML document:
-<blockquote>
-<pre>
-&lt;widgets&gt;
-&lt;widget&gt;
-&lt;manufacturer/&gt;
-&lt;dimensions/&gt;
-&lt;/widget&gt;
-&lt;/widgets&gt;
-</pre>
-</blockquote>
-
-<p>
-The <code>&lt;widget&gt;</code> element can be selected with the following process:
-
-<blockquote>
-<pre>
-// parse the XML as a W3C Document
-DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-Document document = builder.parse(new File("/widgets.xml"));
-
-//Get an XPath object and evaluate the expression
-XPath xpath = XPathFactory.newInstance().newXPath();
-String expression = "/widgets/widget";
-Node widgetNode = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
-
-//or using the evaluateExpression method
-Node widgetNode = xpath.evaluateExpression(expression, document, Node.class);
-</pre>
-</blockquote>
-
-<p>With a reference to the <code>&lt;widget&gt;</code> element, a
-relative XPath expression can be written to select the
-<code>&lt;manufacturer&gt;</code> child element:</p>
-
-<blockquote>
-<pre>
-XPath xpath = XPathFactory.newInstance().newXPath();
-<strong>String expression = "manufacturer";</strong>
-Node manufacturerNode = (Node) xpath.evaluate(expression, <strong>widgetNode</strong>, XPathConstants.NODE);
-
-//or using the evaluateExpression method
-Node manufacturerNode = xpath.evaluateExpression(expression, <strong>widgetNode</strong>, Node.class);
-</pre>
-</blockquote>
-
-<p>
-In the above example, the XML file is read into a DOM Document before being passed
-to the XPath API. The following code demonstrates the use of InputSource to 
-leave it to the XPath implementation to process it:
-
-<blockquote>
-<pre>
-XPath xpath = XPathFactory.newInstance().newXPath();
-String expression = "/widgets/widget";
-InputSource inputSource = new InputSource("widgets.xml");
-NodeList nodes = (NodeList) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
-
-//or using the evaluateExpression method
-XPathNodes nodes = xpath.evaluate(expression, inputSource, XPathNodes.class);
-</pre>
-</blockquote>
-
-<p>
-In the above cases, the type of the expected results are known. In case where
-the result type is unknown or any type, the {@link javax.xml.xpath.XPathEvaluationResult}
-may be used to determine the return type. The following code demonstrates the usage:
-<blockquote>
-<pre>
-XPathEvaluationResult&lt;?&gt; result = xpath.evaluateExpression(expression, document);
-switch (result.type()) {
-    case NODESET:
-        XPathNodes nodes = (XPathNodes)result.value();
-        ...
-        break;
-}
-</pre>
-</blockquote>
-
-<p>
-The XPath 1.0 Number data type is defined as a double. However, the XPath 
-specification also provides functions that returns Integer type. To facilitate
-such operations, the XPath API allows Integer and Long to be used in 
-{@code evaluateExpression} method such as the following code: 
-<blockquote>
-<pre>
-int count = xpath.evaluate("count(/widgets/widget)", document, Integer.class);
-</pre>
-</blockquote>
-
-@since 1.5
-
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/bootstrap/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,32 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides a factory for obtaining instances of <code>DOMImplementation</code>.
+ *
+ * @since 1.5
+ */
+
+package org.w3c.dom.bootstrap;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/events/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <p>
+ * Provides interfaces for DOM Level 2 Events. Refer to the
+ * <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113'>
+ *     Document Object Model (DOM) Level 2 Events Specification
+ * </a>, the DOM Events module builds on
+ * <a href="http://www.w3.org/TR/DOM-Level-2-Core/">
+ *     DOM Level 2 Core Specification</a> and
+ * <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>
+ *     DOM Level 2 Views Specification</a>
+ * that gives to programs and scripts a generic event system.
+ *
+ *
+ * @since 1.5
+ */
+
+package org.w3c.dom.events;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ls/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,39 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * <p>
+ * Provides interfaces for DOM Level 3 Load and Save. Refer to the
+ * <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>
+ *     Document Object Model (DOM) Level 3 Load and Save Specification</a>,
+ * the Load and Save interface allows programs and scripts to dynamically
+ * load the content of an XML document into a DOM document and serialize a DOM
+ * document into an XML document.
+ *
+ *
+ * @since 1.5
+ */
+
+package org.w3c.dom.ls;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,38 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/**
+ * Provides the interfaces for the Document Object Model (DOM). Supports the
+ * <a href="http://www.w3.org/TR/DOM-Level-2-Core/">
+ *     Document Object Model (DOM) Level 2 Core Specification</a>,
+ * <a href="http://www.w3.org/TR/DOM-Level-3-Core">
+ *     Document Object Model (DOM) Level 3 Core Specification</a>,
+ * and <a href="http://www.w3.org/TR/DOM-Level-3-LS">
+ *     Document Object Model (DOM) Level 3 Load and Save Specification</a>.
+ *
+ *
+ * @since 1.4
+ */
+
+package org.w3c.dom;
--- a/jaxp/src/java.xml/share/classes/org/w3c/dom/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<html>
-<head>
-<title>org.w3c.dom package</title>
-</head>
-<body bgcolor="white">
-Provides the interfaces for the Document Object Model (DOM). Supports the
-<a href="http://www.w3.org/TR/DOM-Level-2-Core/">Document Object Model (DOM) Level 2 Core Specification</a>, 
-<a href="http://www.w3.org/TR/DOM-Level-3-Core">Document Object Model (DOM) Level 3 Core Specification</a>, 
-and <a href="http://www.w3.org/TR/DOM-Level-3-LS">Document Object Model (DOM) Level 3 Load and Save Specification</a>.
-
-@since 1.4
-</body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/**
+ * <p>
+ * Provides interfaces for DOM Level 2 Range. Refer to the
+ * <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>
+ *     Document Object Model (DOM) Level 2 Traversal and Range Specification</a>,
+ * the Range module defines specialized interfaces for identifying
+ * and manipulating a range in a document.
+ *
+ *
+ * @since 1.5
+ */
+
+package org.w3c.dom.ranges;
--- a/jaxp/src/java.xml/share/classes/org/w3c/dom/ranges/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-<html>
-<head>
-    <title>W3C IPR SOFTWARE NOTICE</title>
-</head>
-<body>
-    <p>
-      Document Object Model Level 2 Traversal and Range is a 
-      platform and language-neutral interfaces that allow programs 
-      and scripts to dynamically traverse and identify a range of
-      content in a document. The Document Object Model Level 2 
-      Traversal and Range build on the Document Object Model Level 2
-      Core.
-    </p>
-    <p>
-      The DOM Level 2 Traversal and Range specification is composed
-      of two modules. The two modules contain specialized interfaces 
-      dedicated to traversing the document structure and identifying 
-      and manipulating a range in a document.
-    </p>
-    <h1>
-      W3C IPR SOFTWARE NOTICE
-    </h1>
-    <h2>
-      Copyright &copy; 2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved.
-    </h2>
-    <p>
-      The DOM bindings are published under the W3C Software Copyright Notice
-      and License. The software license requires "Notice of any changes or
-      modifications to the W3C files, including the date changes were made."
-      Consequently, modified versions of the DOM bindings must document that
-      they do not conform to the W3C standard; in the case of the IDL binding,
-      the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-      binding, the package names can no longer be in the 'org.w3c' package.
-    </p>
-    <p>
-      <b>Note:</b> The original version of the W3C Software Copyright Notice
-      and License could be found at <a
-      href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
-    </p>
-    <h2>
-      Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved. http://www.w3.org/Consortium/Legal/
-    </h2>
-    <p>
-      This W3C work (including software, documents, or other related items) is
-      being provided by the copyright holders under the following license. By
-      obtaining, using and/or copying this work, you (the licensee) agree that
-      you have read, understood, and will comply with the following terms and
-      conditions:
-    </p>
-    <p>
-      Permission to use, copy, and modify this software and its documentation,
-      with or without modification,&nbsp; for any purpose and without fee or
-      royalty is hereby granted, provided that you include the following on ALL
-      copies of the software and documentation or portions thereof, including
-      modifications, that you make:
-    </p>
-    <ol>
-      <li>
-        The full text of this NOTICE in a location viewable to users of the
-        redistributed or derivative work.
-      </li>
-      <li>
-        Any pre-existing intellectual property disclaimers, notices, or terms
-        and conditions. If none exist, a short notice of the following form
-        (hypertext is preferred, text is permitted) should be used within the
-        body of any redistributed or derivative code: "Copyright &copy;
-        [$date-of-software] <a href="http://www.w3.org/">World Wide Web
-        Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-        Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-        National de Recherche en Informatique et en Automatique</a>, <a
-        href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-        Reserved. http://www.w3.org/Consortium/Legal/"
-      </li>
-      <li>
-        Notice of any changes or modifications to the W3C files, including the
-        date changes were made. (We recommend you provide URIs to the location
-        from which the code is derived.)
-      </li>
-    </ol>
-    <p>
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
-      HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
-      INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
-      FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
-      DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
-      TRADEMARKS OR OTHER RIGHTS.
-    </p>
-    <p>
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-      CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-      DOCUMENTATION.
-    </p>
-    <p>
-      The name and trademarks of copyright holders may NOT be used in
-      advertising or publicity pertaining to the software without specific,
-      written prior permission. Title to copyright in this software and any
-      associated documentation will at all times remain with copyright
-      holders.
-    </p>
-  </body>
-</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/traversal/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,36 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/**
+ * <p>
+ * Provides interfaces for DOM Level 2 Traversal. Refer to the
+ * <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>
+ *     Document Object Model (DOM) Level 2 Traversal and Range Specification</a>,
+ * the Traversal module contains specialized interfaces dedicated to
+ * traversing the document structure.
+ *
+ * @since 1.5
+ */
+
+package org.w3c.dom.traversal;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/w3c/dom/views/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides interfaces for DOM Level 2 Views. Refer to the
+ * <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>
+ *     Document Object Model (DOM) Level 2 Views Specification</a>,
+ * the Views module allows programs and scripts to dynamically access and update
+ * the content of a representation of a document.
+ *
+ *
+ * @since 1.8
+ */
+
+package org.w3c.dom.views;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,72 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides interfaces to SAX2 facilities that
+ * conformant SAX drivers won't necessarily support.
+ *
+ * <p>
+ * See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
+ * for more information about SAX.
+ *
+ * <p>
+ * This package is independent of the SAX2 core, though the functionality
+ * exposed generally needs to be implemented within a parser core.
+ * That independence has several consequences:
+ *
+ * <ul>
+ *
+ * <li>SAX2 drivers are <em>not</em> required to recognize these handlers.
+ * </li>
+ *
+ * <li>You cannot assume that the class files will be present in every SAX2
+ * installation.</li>
+ *
+ * <li>This package may be updated independently of SAX2 (i.e. new
+ * handlers and classes may be added without updating SAX2 itself).</li>
+ *
+ * <li>The new handlers are not implemented by the SAX2
+ * <code>org.xml.sax.helpers.DefaultHandler</code> or
+ * <code>org.xml.sax.helpers.XMLFilterImpl</code> classes.
+ * You can subclass these if you need such behavior, or
+ * use the helper classes found here.</li>
+ *
+ * <li>The handlers need to be registered differently than core SAX2
+ * handlers.</li>
+ *
+ * </ul>
+ *
+ * <p>This package, SAX2-ext, is a standardized extension to SAX2.  It is
+ * designed both to allow SAX parsers to pass certain types of information
+ * to applications, and to serve as a simple model for other SAX2 parser
+ * extension packages.  Not all such extension packages should need to
+ * be recognized directly by parsers, however.
+ * As an example, most validation systems can be cleanly layered on top
+ * of parsers supporting the standardized SAX2 interfaces.
+ *
+ * @since 1.4
+ */
+
+package org.xml.sax.ext;
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/ext/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-<HTML><HEAD>
-<!-- $Id: package.html,v 1.3 2007/10/02 19:32:24 ndw Exp $ -->
-</HEAD><BODY>
-
-<p>
-This package contains interfaces to SAX2 facilities that
-conformant SAX drivers won't necessarily support.
-
-<p>See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
-for more information about SAX.</p>
-
-<p> This package is independent of the SAX2 core, though the functionality
-exposed generally needs to be implemented within a parser core.
-That independence has several consequences:</p>
-
-<ul>
-
-<li>SAX2 drivers are <em>not</em> required to recognize these handlers.
-</li>
-
-<li>You cannot assume that the class files will be present in every SAX2
-installation.</li>
-
-<li>This package may be updated independently of SAX2 (i.e. new
-handlers and classes may be added without updating SAX2 itself).</li>
-
-<li>The new handlers are not implemented by the SAX2
-<code>org.xml.sax.helpers.DefaultHandler</code> or
-<code>org.xml.sax.helpers.XMLFilterImpl</code> classes.
-You can subclass these if you need such behavior, or
-use the helper classes found here.</li>
-
-<li>The handlers need to be registered differently than core SAX2
-handlers.</li>
-
-</ul>
-
-<p>This package, SAX2-ext, is a standardized extension to SAX2.  It is
-designed both to allow SAX parsers to pass certain types of information
-to applications, and to serve as a simple model for other SAX2 parser
-extension packages.  Not all such extension packages should need to
-be recognized directly by parsers, however.
-As an example, most validation systems can be cleanly layered on top
-of parsers supporting the standardized SAX2 interfaces.  </p>
-
-</BODY></HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,38 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *
+ * Provides helper classes, including
+ * support for bootstrapping SAX-based applications.
+ *
+ * <p>
+ * See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
+ * for more information about SAX.
+ *
+ * @since 1.4
+ */
+
+package org.xml.sax.helpers;
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<HTML><HEAD>
-<!-- $Id: package.html,v 1.3 2007/10/02 19:32:24 ndw Exp $ -->
-</HEAD><BODY>
-
-<p>This package contains "helper" classes, including
-support for bootstrapping SAX-based applications.
-
-<p>See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
-for more information about SAX.</p>
-
-</BODY></HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/package-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,327 @@
+/*
+ * 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides the core SAX APIs.
+ * Some SAX1 APIs are deprecated to encourage integration of
+ * namespace-awareness into designs of new applications
+ * and into maintenance of existing infrastructure.
+ *
+ * <p>
+ * See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
+ * for more information about SAX.
+ *
+ *
+ * <h2> SAX2 Standard Feature Flags </h2>
+ *
+ * <p>
+ * One of the essential characteristics of SAX2 is that it added
+ * feature flags which can be used to examine and perhaps modify
+ * parser modes, in particular modes such as validation.
+ * Since features are identified by (absolute) URIs, anyone
+ * can define such features.
+ * Currently defined standard feature URIs have the prefix
+ * <code>http://xml.org/sax/features/</code> before an identifier such as
+ * <code>validation</code>.  Turn features on or off using
+ * <em>setFeature</em>.  Those standard identifiers are:
+ *
+ *
+ * <table border="1" cellpadding="3" cellspacing="0" width="100%">
+ *     <tr align="center" bgcolor="#ccccff">
+ *      <th>Feature ID</th>
+ *      <th>Access</th>
+ *      <th>Default</th>
+ *      <th>Description</th>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>external-general-entities</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>unspecified</em></td>
+ *      <td> Reports whether this parser processes external
+ *          general entities; always true if validating.
+ *              </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>external-parameter-entities</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>unspecified</em></td>
+ *      <td> Reports whether this parser processes external
+ *          parameter entities; always true if validating.
+ *              </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>is-standalone</td>
+ *      <td>(parsing) <em>read-only</em>, (not parsing) <em>none</em></td>
+ *      <td>not applicable</td>
+ *      <td> May be examined only during a parse, after the
+ *          <em>startDocument()</em> callback has been completed; read-only.
+ *          The value is true if the document specified standalone="yes" in
+ *          its XML declaration, and otherwise is false.
+ *              </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>lexical-handler/parameter-entities</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>unspecified</em></td>
+ *      <td> A value of "true" indicates that the LexicalHandler will report
+ *          the beginning and end of parameter entities.
+ *              </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>namespaces</td>
+ *      <td><em>read/write</em></td>
+ *      <td>true</td>
+ *      <td> A value of "true" indicates namespace URIs and unprefixed local names
+ *          for element and attribute names will be available.
+ *              </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>namespace-prefixes</td>
+ *      <td><em>read/write</em></td>
+ *      <td>false</td>
+ *      <td> A value of "true" indicates that XML qualified names (with prefixes) and
+ *          attributes (including <em>xmlns*</em> attributes) will be available.
+ *              </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>resolve-dtd-uris</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>true</em></td>
+ *      <td> A value of "true" indicates that system IDs in declarations will
+ *          be absolutized (relative to their base URIs) before reporting.
+ *          (That is the default behavior for all SAX2 XML parsers.)
+ *          A value of "false" indicates those IDs will not be absolutized;
+ *          parsers will provide the base URI from
+ *          <em>Locator.getSystemId()</em>.
+ *          This applies to system IDs passed in <ul>
+ *              <li><em>DTDHandler.notationDecl()</em>,
+ *              <li><em>DTDHandler.unparsedEntityDecl()</em>, and
+ *              <li><em>DeclHandler.externalEntityDecl()</em>.
+ *          </ul>
+ *          It does not apply to <em>EntityResolver.resolveEntity()</em>,
+ *          which is not used to report declarations, or to
+ *          <em>LexicalHandler.startDTD()</em>, which already provides
+ *          the non-absolutized URI.
+ *          </td>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>string-interning</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>unspecified</em></td>
+ *      <td> Has a value of "true" if all XML names (for elements, prefixes,
+ *          attributes, entities, notations, and local names),
+ *          as well as Namespace URIs, will have been interned
+ *          using <em>java.lang.String.intern</em>. This supports fast
+ *          testing of equality/inequality against string constants,
+ *          rather than forcing slower calls to <em>String.equals()</em>.
+ *          </td>
+ *      </tr>
+ *
+ *     <tr>
+ *     <td>unicode-normalization-checking</td>
+ *     <td><em>read/write</em></td>
+ *     <td><em>false</em></td>
+ *     <td> Controls whether the parser reports Unicode normalization
+ *         errors as described in section 2.13 and Appendix B of the
+ *         XML 1.1 Recommendation. If true, Unicode normalization
+ *         errors are reported using the ErrorHandler.error() callback.
+ *         Such errors are not fatal in themselves (though, obviously,
+ *         other Unicode-related encoding errors may be).
+ *              </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>use-attributes2</td>
+ *      <td><em>read-only</em></td>
+ *      <td>not applicable</td>
+ *      <td> Returns "true" if the <em>Attributes</em> objects passed by
+ *          this parser in <em>ContentHandler.startElement()</em>
+ *          implement the <a href="ext/Attributes2.html"
+ *          ><em>org.xml.sax.ext.Attributes2</em></a> interface.
+ *          That interface exposes additional DTD-related information,
+ *          such as whether the attribute was specified in the
+ *          source text rather than defaulted.
+ *      </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>use-locator2</td>
+ *      <td><em>read-only</em></td>
+ *      <td>not applicable</td>
+ *      <td> Returns "true" if the <em>Locator</em> objects passed by
+ *          this parser in <em>ContentHandler.setDocumentLocator()</em>
+ *          implement the <a href="ext/Locator2.html"
+ *          ><em>org.xml.sax.ext.Locator2</em></a> interface.
+ *          That interface exposes additional entity information,
+ *          such as the character encoding and XML version used.
+ *         </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>use-entity-resolver2</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>true</em></td>
+ *      <td> Returns "true" if, when <em>setEntityResolver</em> is given
+ *          an object implementing the <a href="ext/EntityResolver2.html"
+ *          ><em>org.xml.sax.ext.EntityResolver2</em></a> interface,
+ *          those new methods will be used.
+ *          Returns "false" to indicate that those methods will not be used.
+ *      </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>validation</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>unspecified</em></td>
+ *      <td> Controls whether the parser is reporting all validity
+ *          errors; if true, all external entities will be read.
+ *      </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>xmlns-uris</td>
+ *      <td><em>read/write</em></td>
+ *      <td><em>false</em></td>
+ *      <td> Controls whether, when the <em>namespace-prefixes</em> feature
+ *          is set, the parser treats namespace declaration attributes as
+ *          being in the <em>http://www.w3.org/2000/xmlns/</em> namespace.
+ *          By default, SAX2 conforms to the original "Namespaces in XML"
+ *          Recommendation, which explicitly states that such attributes are
+ *          not in any namespace.
+ *          Setting this optional flag to "true" makes the SAX2 events conform to
+ *          a later backwards-incompatible revision of that recommendation,
+ *          placing those attributes in a namespace.
+ *      </td>
+ *     </tr>
+ *
+ *     <tr>
+ *         <td>xml-1.1</td>
+ *         <td><em>read-only</em></td>
+ *         <td>not applicable</td>
+ *         <td> Returns "true" if the parser supports both XML 1.1 and XML 1.0.
+ *             Returns "false" if the parser supports only XML 1.0.
+ *         </td>
+ *     </tr>
+ * </table>
+ *
+ * <p>
+ * Support for the default values of the
+ * <em>namespaces</em> and <em>namespace-prefixes</em>
+ * properties is required.
+ * Support for any other feature flags is entirely optional.
+ *
+ *
+ * <p>
+ * For default values not specified by SAX2,
+ * each XMLReader implementation specifies its default,
+ * or may choose not to expose the feature flag.
+ * Unless otherwise specified here,
+ * implementations may support changing current values
+ * of these standard feature flags, but not while parsing.
+ *
+ *
+ * <h2> SAX2 Standard Handler and Property IDs </h2>
+ *
+ * <p>
+ * For parser interface characteristics that are described
+ * as objects, a separate namespace is defined.  The
+ * objects in this namespace are again identified by URI, and
+ * the standard property URIs have the prefix
+ * <code>http://xml.org/sax/properties/</code> before an identifier such as
+ * <code>lexical-handler</code> or
+ * <code>dom-node</code>.  Manage those properties using
+ * <em>setProperty()</em>.  Those identifiers are:
+ *
+ * <table border="1" cellpadding="3" cellspacing="0" width="100%">
+ *     <tr align="center" bgcolor="#ccccff">
+ *      <th>Property ID</th>
+ *      <th>Description</th>
+ *      </tr>
+ *
+ *     <tr>
+ *      <td>declaration-handler</td>
+ *      <td> Used to see most DTD declarations except those treated
+ *          as lexical ("document element name is ...") or which are
+ *          mandatory for all SAX parsers (<em>DTDHandler</em>).
+ *          The Object must implement <a href="ext/DeclHandler.html"
+ *          ><em>org.xml.sax.ext.DeclHandler</em></a>.
+ *         </td>
+ *     </tr>
+ *
+ *     <tr>
+ *         <td>document-xml-version</td>
+ *         <td> May be examined only during a parse, after the startDocument()
+ *             callback has been completed; read-only. This property is a
+ *             literal string describing the actual XML version of the document,
+ *             such as "1.0" or "1.1".
+ *         </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>dom-node</td>
+ *      <td> For "DOM Walker" style parsers, which ignore their
+ *          <em>parser.parse()</em> parameters, this is used to
+ *          specify the DOM (sub)tree being walked by the parser.
+ *          The Object must implement the
+ *          <em>org.w3c.dom.Node</em> interface.
+ *         </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>lexical-handler</td>
+ *      <td> Used to see some syntax events that are essential in some
+ *          applications:  comments, CDATA delimiters, selected general
+ *          entity inclusions, and the start and end of the DTD
+ *          (and declaration of document element name).
+ *          The Object must implement <a href="ext/LexicalHandler.html"
+ *          ><em>org.xml.sax.ext.LexicalHandler</em></a>.
+ *         </td>
+ *     </tr>
+ *
+ *     <tr>
+ *      <td>xml-string</td>
+ *      <td> Readable only during a parser callback, this exposes a <b>TBS</b>
+ *          chunk of characters responsible for the current event.
+ *         </td>
+ *     </tr>
+ * </table>
+ *
+ * <p>
+ * All of these standard properties are optional.
+ * XMLReader implementations are not required to support them.
+ *
+ *
+ * @since 1.4
+ */
+
+package org.xml.sax;
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/package.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +0,0 @@
-<html><head>
-<!-- $Id: package.html,v 1.3 2007/10/02 19:32:24 ndw Exp $ -->
-</head><body>
-
-<p> This package provides the core SAX APIs.
-Some SAX1 APIs are deprecated to encourage integration of
-namespace-awareness into designs of new applications
-and into maintenance of existing infrastructure. </p>
-
-<p>See <a target='_top' href='http://www.saxproject.org'>http://www.saxproject.org</a>
-for more information about SAX.</p>
-
-
-<h2> SAX2 Standard Feature Flags </h2>
-
-<p> One of the essential characteristics of SAX2 is that it added
-feature flags which can be used to examine and perhaps modify
-parser modes, in particular modes such as validation.
-Since features are identified by (absolute) URIs, anyone
-can define such features.   
-Currently defined standard feature URIs have the prefix
-<code>http://xml.org/sax/features/</code> before an identifier such as
-<code>validation</code>.  Turn features on or off using
-<em>setFeature</em>.  Those standard identifiers are: </p>
-
-
-<table class="striped">
-    <caption>SAX2 Standard Features </caption>
-    <thead>
-    <tr>
-	<th>Feature ID</th>
-	<th>Access</th>
-	<th>Default</th>
-	<th>Description</th>
-	</tr>
-    </thead>
-   	
-    <tbody>
-    <tr>
-	<td>external-general-entities</td>
-	<td><em>read/write</em></td>
-	<td><em>unspecified</em></td>
-	<td> Reports whether this parser processes external
-	    general entities; always true if validating.
-		</td>
-	</tr>
-
-    <tr>
-	<td>external-parameter-entities</td>
-	<td><em>read/write</em></td>
-	<td><em>unspecified</em></td>
-	<td> Reports whether this parser processes external
-	    parameter entities; always true if validating.
-		</td>
-	</tr>
-
-    <tr>
-	<td>is-standalone</td>
-	<td>(parsing) <em>read-only</em>, (not parsing) <em>none</em></td>
-	<td>not applicable</td>
-	<td> May be examined only during a parse, after the
-	    <em>startDocument()</em> callback has been completed; read-only.
-	    The value is true if the document specified standalone="yes" in 
-	    its XML declaration, and otherwise is false.
-		</td>
-	</tr>
-
-    <tr>
-	<td>lexical-handler/parameter-entities</td>
-	<td><em>read/write</em></td>
-	<td><em>unspecified</em></td>
-	<td> A value of "true" indicates that the LexicalHandler will report
-	    the beginning and end of parameter entities.
-		</td>
-	</tr>
-
-    <tr>
-	<td>namespaces</td>
-	<td><em>read/write</em></td>
-	<td>true</td>
-	<td> A value of "true" indicates namespace URIs and unprefixed local names
-	    for element and attribute names will be available.
-		</td>
-	</tr>
-
-    <tr>
-	<td>namespace-prefixes</td>
-	<td><em>read/write</em></td>
-	<td>false</td>
-	<td> A value of "true" indicates that XML qualified names (with prefixes) and
-	    attributes (including <em>xmlns*</em> attributes) will be available.
-		</td>
-	</tr>
-
-    <tr>
-	<td>resolve-dtd-uris</td>
-	<td><em>read/write</em></td>
-	<td><em>true</em></td>
-	<td> A value of "true" indicates that system IDs in declarations will
-	    be absolutized (relative to their base URIs) before reporting.
-	    (That is the default behavior for all SAX2 XML parsers.)
-	    A value of "false" indicates those IDs will not be absolutized;
-	    parsers will provide the base URI from
-	    <em>Locator.getSystemId()</em>.
-	    This applies to system IDs passed in <ul>
-		<li><em>DTDHandler.notationDecl()</em>,
-		<li><em>DTDHandler.unparsedEntityDecl()</em>, and
-		<li><em>DeclHandler.externalEntityDecl()</em>.
-	    </ul>
-	    It does not apply to <em>EntityResolver.resolveEntity()</em>,
-	    which is not used to report declarations, or to
-	    <em>LexicalHandler.startDTD()</em>, which already provides
-	    the non-absolutized URI.
-	    </td>
-	</tr>
-
-    <tr>
-	<td>string-interning</td>
-	<td><em>read/write</em></td>
-	<td><em>unspecified</em></td>
-	<td> Has a value of "true" if all XML names (for elements, prefixes,
-	    attributes, entities, notations, and local names),
-	    as well as Namespace URIs, will have been interned
-	    using <em>java.lang.String.intern</em>. This supports fast
-	    testing of equality/inequality against string constants,
-	    rather than forcing slower calls to <em>String.equals()</em>.
-	    </td>
-	</tr>
-
-    <tr>
-    <td>unicode-normalization-checking</td>
-    <td><em>read/write</em></td>
-    <td><em>false</em></td>
-    <td> Controls whether the parser reports Unicode normalization 
-        errors as described in section 2.13 and Appendix B of the 
-        XML 1.1 Recommendation. If true, Unicode normalization
-        errors are reported using the ErrorHandler.error() callback.
-        Such errors are not fatal in themselves (though, obviously,
-        other Unicode-related encoding errors may be).
-		</td>
-    </tr>
-    
-    <tr>
-	<td>use-attributes2</td>
-	<td><em>read-only</em></td>
-	<td>not applicable</td>
-	<td> Returns "true" if the <em>Attributes</em> objects passed by
-	    this parser in <em>ContentHandler.startElement()</em>
-	    implement the <a href="ext/Attributes2.html"
-	    ><em>org.xml.sax.ext.Attributes2</em></a> interface.
-	    That interface exposes additional DTD-related information,
-	    such as whether the attribute was specified in the
-	    source text rather than defaulted.
-		</td>
-	</tr>
-
-    <tr>
-	<td>use-locator2</td>
-	<td><em>read-only</em></td>
-	<td>not applicable</td>
-	<td> Returns "true" if the <em>Locator</em> objects passed by
-	    this parser in <em>ContentHandler.setDocumentLocator()</em>
-	    implement the <a href="ext/Locator2.html"
-	    ><em>org.xml.sax.ext.Locator2</em></a> interface.
-	    That interface exposes additional entity information,
-	    such as the character encoding and XML version used.
-		</td>
-	</tr>
-
-    <tr>
-	<td>use-entity-resolver2</td>
-	<td><em>read/write</em></td>
-	<td><em>true</em></td>
-	<td> Returns "true" if, when <em>setEntityResolver</em> is given
-	    an object implementing the <a href="ext/EntityResolver2.html"
-	    ><em>org.xml.sax.ext.EntityResolver2</em></a> interface,
-	    those new methods will be used.
-	    Returns "false" to indicate that those methods will not be used.
-		</td>
-	</tr>
-
-    <tr>
-	<td>validation</td>
-	<td><em>read/write</em></td>
-	<td><em>unspecified</em></td>
-	<td> Controls whether the parser is reporting all validity
-	    errors; if true, all external entities will be read.
-		</td>
-	</tr>
-
-    <tr>
-	<td>xmlns-uris</td>
-	<td><em>read/write</em></td>
-	<td><em>false</em></td>
-	<td> Controls whether, when the <em>namespace-prefixes</em> feature
-	    is set, the parser treats namespace declaration attributes as
-	    being in the <em>http://www.w3.org/2000/xmlns/</em> namespace.
-	    By default, SAX2 conforms to the original "Namespaces in XML"
-	    Recommendation, which explicitly states that such attributes are
-	    not in any namespace.
-	    Setting this optional flag to "true" makes the SAX2 events conform to
-	    a later backwards-incompatible revision of that recommendation,
-	    placing those attributes in a namespace.
-		</td>
-	</tr>
-
-    <tr>
-    <td>xml-1.1</td>
-    <td><em>read-only</em></td>
-    <td>not applicable</td>
-    <td> Returns "true" if the parser supports both XML 1.1 and XML 1.0.
-        Returns "false" if the parser supports only XML 1.0.
-		</td>
-    </tr>
-    </tbody>
-</table>
-
-<p> Support for the default values of the
-<em>namespaces</em> and <em>namespace-prefixes</em>
-properties is required.
-Support for any other feature flags is entirely optional.
-</p>
-
-<p> For default values not specified by SAX2,
-each XMLReader implementation specifies its default,
-or may choose not to expose the feature flag.
-Unless otherwise specified here,
-implementations may support changing current values
-of these standard feature flags, but not while parsing.
-</p>
-
-<h2> SAX2 Standard Handler and Property IDs </h2>
-
-<p> For parser interface characteristics that are described
-as objects, a separate namespace is defined.  The
-objects in this namespace are again identified by URI, and
-the standard property URIs have the prefix
-<code>http://xml.org/sax/properties/</code> before an identifier such as
-<code>lexical-handler</code> or
-<code>dom-node</code>.  Manage those properties using
-<em>setProperty()</em>.  Those identifiers are: </p>
-
-<table class="striped">
-<caption>SAX2 Standard Properties </caption>
-<thead>
-    <tr>
-	<th>Property ID</th>
-	<th>Description</th>
-	</tr>
-</thead>
-<tbody>
-
-    <tr>
-	<td>declaration-handler</td>
-	<td> Used to see most DTD declarations except those treated
-	    as lexical ("document element name is ...") or which are
-	    mandatory for all SAX parsers (<em>DTDHandler</em>).
-	    The Object must implement <a href="ext/DeclHandler.html"
-	    ><em>org.xml.sax.ext.DeclHandler</em></a>.
-	    </td>
-	</tr>
-
-    <tr>
-        <td>document-xml-version</td>
-        <td> May be examined only during a parse, after the startDocument()
-            callback has been completed; read-only. This property is a 
-            literal string describing the actual XML version of the document, 
-            such as "1.0" or "1.1".
-            </td>
-        </tr>
-    
-    <tr>
-	<td>dom-node</td>
-	<td> For "DOM Walker" style parsers, which ignore their
-	    <em>parser.parse()</em> parameters, this is used to
-	    specify the DOM (sub)tree being walked by the parser.
-	    The Object must implement the
-	    <em>org.w3c.dom.Node</em> interface.
-	    </td>
-	</tr>
-
-    <tr>
-	<td>lexical-handler</td>
-	<td> Used to see some syntax events that are essential in some
-	    applications:  comments, CDATA delimiters, selected general
-	    entity inclusions, and the start and end of the DTD
-	    (and declaration of document element name).
-	    The Object must implement <a href="ext/LexicalHandler.html"
-	    ><em>org.xml.sax.ext.LexicalHandler</em></a>.
-	    </td>
-	</tr>
-
-    <tr>
-	<td>xml-string</td>
-	<td> Readable only during a parser callback, this exposes a <b>TBS</b>
-	    chunk of characters responsible for the current event. </td>
-	</tr>
-</tbody>
-</table>
-
-<p> All of these standard properties are optional;
-XMLReader implementations need not support them.
-</p>
-
-</body></html>
--- a/jaxws/.hgtags	Mon Jun 05 13:45:34 2017 -0700
+++ b/jaxws/.hgtags	Wed Jul 05 23:36:51 2017 +0200
@@ -427,3 +427,5 @@
 e705867d9989d00e4357f66f18b302c95e13b5e7 jdk-10+8
 2fe03e35bed54238bcaeeb298b011df240e3711d jdk-10+9
 139e7c786ee4885efe53eb650b72c7b5a2d3b964 jdk-9+171
+3ccd9f37faa601866db5edb827363e797f5a2493 jdk-10+10
+8c615099f3e3ca137325be34bf566b767d9e3c64 jdk-9+172
--- a/jdk/.hgtags	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/.hgtags	Wed Jul 05 23:36:51 2017 +0200
@@ -424,3 +424,5 @@
 f0adc10ed8316e6cf316e3208c5ecf6835d22bc4 jdk-10+8
 b9409a7daa6c793dd631e52fe6ef79d08a3b337a jdk-10+9
 29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171
+df64bd4757d0d130d62a22b8143ba31d3a16ac18 jdk-10+10
+0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172
--- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java	Wed Jul 05 23:36:51 2017 +0200
@@ -91,6 +91,10 @@
      * If the file exists but is a directory rather than a regular file, does
      * not exist but cannot be created, or cannot be opened for any other
      * reason then a <code>FileNotFoundException</code> is thrown.
+     * <p>
+     * @implSpec Invoking this constructor with the parameter {@code name} is
+     * equivalent to invoking {@link #FileOutputStream(String,boolean)
+     * new FileOutputStream(name, false)}.
      *
      * @param      name   the system-dependent filename
      * @exception  FileNotFoundException  if the file exists but is a directory
--- a/jdk/src/java.base/share/classes/java/io/Serializable.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/io/Serializable.java	Wed Jul 05 23:36:51 2017 +0200
@@ -84,9 +84,9 @@
  * correspondingly named fields in the current object.  This handles the case
  * when the class has evolved to add new fields. The method does not need to
  * concern itself with the state belonging to its superclasses or subclasses.
- * State is saved by writing the individual fields to the
- * ObjectOutputStream using the writeObject method or by using the
- * methods for primitive data types supported by DataOutput.
+ * State is restored by reading data from the ObjectInputStream for
+ * the individual fields and making assignments to the appropriate fields
+ * of the object. Reading primitive data types is supported by DataInput.
  *
  * <p>The readObjectNoData method is responsible for initializing the state of
  * the object for its particular class in the event that the serialization
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -588,19 +588,18 @@
     }
 
     @Override
-    void handleParameterNumberMismatch(int resultLength, int numParameters) {
+    boolean handleParameterNumberMismatch(int resultLength, int numParameters) {
         Class<?> declaringClass = getDeclaringClass();
         if (declaringClass.isEnum() ||
             declaringClass.isAnonymousClass() ||
             declaringClass.isLocalClass() )
-            return ; // Can't do reliable parameter counting
+            return false; // Can't do reliable parameter counting
         else {
-            if (!declaringClass.isMemberClass() || // top-level
-                // Check for the enclosing instance parameter for
-                // non-static member classes
-                (declaringClass.isMemberClass() &&
-                 ((declaringClass.getModifiers() & Modifier.STATIC) == 0)  &&
-                 resultLength + 1 != numParameters) ) {
+            if (declaringClass.isMemberClass() &&
+                ((declaringClass.getModifiers() & Modifier.STATIC) == 0)  &&
+                resultLength + 1 == numParameters) {
+                return true;
+            } else {
                 throw new AnnotationFormatError(
                           "Parameter annotations don't match number of parameters");
             }
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Executable.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -551,12 +551,18 @@
 
         Annotation[][] result = parseParameterAnnotations(parameterAnnotations);
 
-        if (result.length != numParameters)
-            handleParameterNumberMismatch(result.length, numParameters);
+        if (result.length != numParameters &&
+            handleParameterNumberMismatch(result.length, numParameters)) {
+            Annotation[][] tmp = new Annotation[result.length+1][];
+            // Shift annotations down one to account for an implicit leading parameter
+            System.arraycopy(result, 0, tmp, 1, result.length);
+            tmp[0] = new Annotation[0];
+            result = tmp;
+        }
         return result;
     }
 
-    abstract void handleParameterNumberMismatch(int resultLength, int numParameters);
+    abstract boolean handleParameterNumberMismatch(int resultLength, int numParameters);
 
     /**
      * {@inheritDoc}
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -719,7 +719,7 @@
     }
 
     @Override
-    void handleParameterNumberMismatch(int resultLength, int numParameters) {
+    boolean handleParameterNumberMismatch(int resultLength, int numParameters) {
         throw new AnnotationFormatError("Parameter annotations don't match number of parameters");
     }
 }
--- a/jdk/src/java.base/share/classes/java/time/Clock.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/time/Clock.java	Wed Jul 05 23:36:51 2017 +0200
@@ -127,10 +127,13 @@
  * document whether or not they do support serialization.
  *
  * @implNote
- * The clock implementation provided here is based on {@link System#currentTimeMillis()}.
- * That method provides little to no guarantee about the accuracy of the clock.
- * Applications requiring a more accurate clock must implement this abstract class
- * themselves using a different external clock, such as an NTP server.
+ * The clock implementation provided here is based on the same underlying clock
+ * as {@link System#currentTimeMillis()}, but may have a precision finer than
+ * milliseconds if available.
+ * However, little to no guarantee is provided about the accuracy of the
+ * underlying clock. Applications requiring a more accurate clock must implement
+ * this abstract class themselves using a different external clock, such as an
+ * NTP server.
  *
  * @since 1.8
  */
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeTextProvider.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeTextProvider.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -112,6 +112,9 @@
         }
     };
 
+    // Singleton instance
+    private static final DateTimeTextProvider INSTANCE = new DateTimeTextProvider();
+
     DateTimeTextProvider() {}
 
     /**
@@ -120,7 +123,7 @@
      * @return the provider, not null
      */
     static DateTimeTextProvider getInstance() {
-        return new DateTimeTextProvider();
+        return INSTANCE;
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/util/Calendar.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Calendar.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2216,7 +2216,7 @@
                                    Locale locale, int fieldMask) {
         int baseStyle = getBaseStyle(style); // Ignore the standalone mask
         if (field < 0 || field >= fields.length ||
-            baseStyle < minStyle || baseStyle > maxStyle) {
+            baseStyle < minStyle || baseStyle > maxStyle || baseStyle == 3) {
             throw new IllegalArgumentException();
         }
         if (locale == null) {
--- a/jdk/src/java.base/share/classes/java/util/Locale.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Locale.java	Wed Jul 05 23:36:51 2017 +0200
@@ -2702,6 +2702,7 @@
          * @see #setExtension(char, String)
          */
         public Builder removeUnicodeLocaleAttribute(String attribute) {
+            Objects.requireNonNull(attribute);
             try {
                 localeBuilder.removeUnicodeLocaleAttribute(attribute);
             } catch (LocaleSyntaxException e) {
--- a/jdk/src/java.base/share/classes/overview-core.html	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
-
-Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-
-</head>
-<body bgcolor="white">
-
-This document is the API specification for the Java&#x2122;
-Platform, Standard Edition.
-
-</body>
-</html>
--- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Wed Jul 05 23:36:51 2017 +0200
@@ -564,7 +564,6 @@
         }
 
         validateMainClass(mainClass);
-
         return mainClass;
     }
 
@@ -615,7 +614,7 @@
             }
         } catch (LinkageError le) {
             abort(null, "java.launcher.module.error3", mainClass, m.getName(),
-                    le.getClass().getName() + ": " + le.getLocalizedMessage());
+                le.getClass().getName() + ": " + le.getLocalizedMessage());
         }
         if (c == null) {
             abort(null, "java.launcher.module.error2", mainClass, mainModule);
@@ -703,14 +702,22 @@
 
     // Check the existence and signature of main and abort if incorrect
     static void validateMainClass(Class<?> mainClass) {
-        Method mainMethod;
+        Method mainMethod = null;
         try {
             mainMethod = mainClass.getMethod("main", String[].class);
         } catch (NoSuchMethodException nsme) {
             // invalid main or not FX application, abort with an error
             abort(null, "java.launcher.cls.error4", mainClass.getName(),
                   JAVAFX_APPLICATION_CLASS_NAME);
-            return; // Avoid compiler issues
+        } catch (Throwable e) {
+            if (mainClass.getModule().isNamed()) {
+                abort(e, "java.launcher.module.error5",
+                      mainClass.getName(), mainClass.getModule(),
+                      e.getClass().getName(), e.getLocalizedMessage());
+            } else {
+                abort(e,"java.launcher.cls.error7", mainClass.getName(),
+                      e.getClass().getName(), e.getLocalizedMessage());
+            }
         }
 
         /*
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -207,6 +207,9 @@
 java.launcher.cls.error6=\
     Error: LinkageError occurred while loading main class {0}\n\
     \t{1}
+java.launcher.cls.error7=\
+     Error: Unable to initialize main class {0}\n\
+     Caused by: {1}: {2}
 java.launcher.jar.error1=\
     Error: An unexpected error occurred while trying to open file {0}
 java.launcher.jar.error2=manifest not found in {0}
@@ -221,7 +224,10 @@
 java.launcher.module.error2=\
     Error: Could not find or load main class {0} in module {1}
 java.launcher.module.error3=\
-    Error: Unable to load main class {0} from module {1}\n\
+    Error: Unable to load main class {0} in module {1}\n\
     \t{2}
 java.launcher.module.error4=\
     {0} not found
+java.launcher.module.error5=\
+    Error: Unable to initialize main class {0} in module {1}\n\
+    Caused by: {1}: {2}
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,31 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Verwendung: {0} [Optionen] Klasse [Argumente...]\n           (zur Ausf\u00FChrung einer Klasse)\n   oder  {0} [Optionen] -jar JAR-Datei [Argumente...]\n           (zur Ausf\u00FChrung einer JAR-Datei)\n   oder  {0} [Optionen] -p <Modulpfad> -m <Modulname>[/<Hauptklasse>] [Argumente...]\n           (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "Optionen" Folgendes umfasst:\n\n
+java.launcher.opt.header  =   Verwendung: {0} [Optionen] <mainclass> [args...]\n           (zur Ausf\u00FChrung einer Klasse)\n   oder  {0} [Optionen] -jar <jarfile> [args...]\n           (zur Ausf\u00FChrung einer JAR-Datei)\n   oder  {0} [Optionen] -m <module>[/<mainclass>] [args...]\n       {0} [Optionen] --module <module>[/<mainclass>] [args...]\n            (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\n\n Argumente, die auf die Hauptklasse folgen, -jar <jarfile>, -m oder --module\n <module>/<mainclass> werden als Argumente f\u00FCr die Hauptklasse \u00FCbergeben.\n\n wobei "Optionen" Folgendes umfasst:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  Veraltet, wird in einem zuk\u00FCnftigen Release entfernt\n
 java.launcher.opt.vmselect   =\    {0}\t  zur Auswahl der "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  ist ein Synonym f\u00FCr die "{1}" VM  [verworfen]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =-cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n    --class-path <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven zur Suche nach Klassendateien.\n    -p <Modulpfad>\n    --module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n                  ein Modulverzeichnis ist.\n    --upgrade-module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, wobei jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n                  Module im Laufzeitimage ersetzen\n    -m <Modul>[/<Hauptklasse>]\n    --module <Modulname>[/<Hauptklasse>]\n                  Das anf\u00E4ngliche aufzul\u00F6sende Modul und der Name der auszuf\u00FChrenden\n                  Hauptklasse, wenn nicht durch das Modul angegeben\n    --add-modules <Modulname>[,<Modulname>...]\n                  Zus\u00E4tzlich zum anf\u00E4nglichen Modul aufzul\u00F6sende Root-Module.\n                  <Modulname> kann auch ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH sein.\n    --limit-modules <Modulname>[,<Modulname>...]\n                  Begrenzt die Gesamtheit der beobachtbaren Module\n    --list-modules [<Modulname>[,<Modulname>...]]\n                  F\u00FChrt die beobachtbaren Module auf und beendet den Vorgang\n    --dry-run     Erstellt VM, f\u00FChrt jedoch die Hauptmethode nicht aus.\n                  Diese --dry-run-Option kann zur Validierung der Befehlszeilenoptionen,\n                  etwa der Modulsystemkonfiguration, n\u00FCtzlich sein.\n    -D<Name>=<Wert>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|gc|jni]\n                  Aktiviert Verbose-Ausgabe\n    -version      Druckt die Produktversion in den Fehlerstream und beendet den Vorgang\n    --version     Druckt die Produktversion in den Ausgabestream und beendet den Vorgang\n    -showversion  Druckt die Produktversion in den Fehlerstream und f\u00E4hrt fort\n    --show-version\n                  Druckt die Produktversion in den Ausgabestream und f\u00E4hrt fort\n    -? -h -help\n                   Gibt diese Hilfemeldung in den Fehlerstream aus\n    --help         Gibt diese Hilfemeldung in den Ausgabestream aus\n    -X            Gibt Hilfe zu zus\u00E4tzlichen Optionen in den Fehlerstream aus\n   --help-extra  Gibt Hilfe zu zus\u00E4tzlichen Optionen in den Ausgabestream aus\n    -ea[:<Packagename>...|:<Klassenname>]\n    -enableassertions[:<Packagename>...|:<Klassenname>]\n                  Aktiviert Assertions mit angegebener Granularit\u00E4t\n    -da[:<Packagename>...|:<Klassenname>]\n    -disableassertions[:<Packagename>...|:<Klassenname>]\n                  Deaktiviert Assertions mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert System-Assertions\n    -dsa | -disablesystemassertions\n                  Deaktiviert System-Assertions\n    -agentlib:<Lib-Name>[=<Optionen>]\n                  L\u00E4dt native Agent Library <Lib-Name>, Beispiel: -agentlib:jdwp\n                  siehe auch -agentlib:jdwp=help\n    -agentpath:<Pfadname>[=<Optionen>]\n                  L\u00E4dt native Agent Library nach vollst\u00E4ndigem Pfadnamen\n    -javaagent:<JAR-Pfad>[=<Optionen>]\n                  L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<Bildpfad>\n                  Zeigt Begr\u00FC\u00DFungsbildschirm mit angegebenem Bild an\n                  HiDPI-skalierte Bilder werden automatisch unterst\u00FCtzt und verwendet,\n                  sofern verf\u00FCgbar. Der nicht skalierte Bilddateiname, z.B. image.ext,\n                  muss immer als Argument an die Option -splash \u00FCbergeben \
-werden.\n                  Das geeignetste skalierte Bild wird automatisch\n                  ausgew\u00E4hlt.\n                  Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API.\n    @<Dateipfad>   Liest Optionen aus der angegebenen Datei\n\nZur Angabe eines Arguments f\u00FCr eine lange Option k\u00F6nnen Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
+java.launcher.opt.footer = \    -cp <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n    --class-path <Klassensuchpfad mit Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven, in denen nach Klassendateien gesucht wird.\n    -p <Modulpfad>\n    --module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist.\n    --upgrade-module-path <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, von denen jedes Verzeichnis\n                  ein Verzeichnis mit Modulen ist, die upgradef\u00E4hige\n                  Module im Laufzeitimage ersetzen\n    --add-modules <Modulname>[,<Modulname>...]\n                  Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen.\n                  <Modulname> kann auch wie folgt lauten: ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  Listet beobachtbare Module auf und beendet den Vorgang\n    --d <Modulname>\n    --describe-module <Modulname>\n                  Beschreibt ein Modul und beendet den Vorgang\n    --dry-run     Erstellt eine VM und l\u00E4dt die Hauptklasse, f\u00FChrt aber nicht die Hauptmethode aus.\n                  Die Option "--dry-run" kann n\u00FCtzlich sein, um die\n                  Befehlszeilenoptionen, wie die Modulsystemkonfiguration, zu validieren.\n    --validate-modules\n                  Validiert alle Module und beendet den Vorgang\n                  Die Option "--validate-modules" kann n\u00FCtzlich sein, um\n                  Konflikte und andere Fehler mit Modulen auf dem Modulpfad zu ermitteln.\n    -D<Name>=<Wert>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|module|gc|jni]\n                  Ausgabe im Verbose-Modus aktivieren\n    -version      Gibt die Produktversion an den Fehlerstream aus und beendet den Vorgang\n    --version      Gibt die Produktversion an den Outputstream aus und beendet den Vorgang\n    -showversion  Gibt die Produktversion an den Fehlerstream aus und setzt den Vorgang fort\n    --show-version\n                  Gibt die Produktversion an den Outputstream aus und setzt den Vorgang fort\n    --show-module-resolution\n                  Zeigt die Modulaufl\u00F6sungsausgabe beim Start an\n    -? -h -help\n                  Gibt diese Hilfemeldung an den Fehlerstream aus\n    --help        Gibt diese Hilfemeldung an den Outputstream aus\n    -X            Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Fehlerstream aus\n    --help-extra  Gibt Hilfe zu zus\u00E4tzlichen Optionen an den Outputstream aus\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  Aktiviert Assertions mit angegebener Granularit\u00E4t\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  Deaktiviert Assertions mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert System-Assertions\n    -dsa | -disablesystemassertions\n                  Deaktiviert System-Assertions\n    -agentlib:<libname>[=<options>]\n                  L\u00E4dt die native Agent Library <libname>. Beispiel: -agentlib:jdwp\n                  siehe auch -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  L\u00E4dt die native Agent Library mit dem vollst\u00E4ndigen Pfadnamen\n    -javaagent:<jarpath>[=<options>]\n                  L\u00E4dt den Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<imagepath>\n                  Zeigt den Startbildschirm mit einem angegebenen Bild an\n                  Skalierte HiDPI-Bilder werden automatisch \
+unterst\u00FCtzt und verwendet,\n                  falls verf\u00FCgbar. Der nicht skalierte Bilddateiname (Beispiel: image.ext)\n                  muss immer als Argument an die Option "-splash" \u00FCbergeben werden.\n                  Das am besten geeignete angegebene skalierte Bild wird\n                  automatisch ausgew\u00E4hlt.\n                  Weitere Informationen finden Sie in der Dokumentation zur SplashScreen-API\n    @argument files\n                  Eine oder mehrere Argumentdateien mit Optionen\n    -disable-@files\n                  Verhindert die weitere Erweiterung von Argumentdateien\nUm ein Argument f\u00FCr eine lange Option anzugeben, k\u00F6nnen Sie --<Name>=<Wert> oder\n--<Name> <Wert> verwenden.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           Deaktiviert Hintergrundkompilierung\n    -Xbootclasspath/a: <Durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n                      an Ende von Bootstrap-Klassenpfad anh\u00E4ngen\n    -Xcheck:jni       F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n    -Xcomp            Erzwingt Kompilierung von Methoden beim ersten Aufruf\n    -Xdebug           Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n    -Xdiag            Zeigt zus\u00E4tzliche Diagnosemeldungen an\n    -Xdiag:resolver   Zeigt Resolver-Diagnosemeldungen an\n    -Xfuture          Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n    -Xint             Nur Ausf\u00FChrung im interpretierten Modus\n    -Xinternalversion\n                      Zeigt detailliertere JVM-Versionsinformationen an als die\n                      Option -version\n    -Xloggc:<Datei>    Protokolliert GC-Status in einer Datei mit Zeitstempeln\n    -Xmixed           Ausf\u00FChrung im gemischten Modus (Standard)\n    -Xmn<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche und maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n                      f\u00FCr die junge Generation (Nursery) fest\n    -Xms<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n    -Xmx<Gr\u00F6\u00DFe>        Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n    -Xnoclassgc       Deaktiviert die Klassen-Garbage Collection\n    -Xprof            Gibt CPU-Profilierungsdaten aus\n    -Xrs              Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n    -Xshare:auto      Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n    -Xshare:off       Versucht, keine freigegebene Klassendaten zu verwenden\n    -Xshare:on        Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n    -XshowSettings    Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:all\n                      Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:locale\n                      Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:properties\n                      Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n    -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n    -Xss<Gr\u00F6\u00DFe>        Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n    -Xverify          Legt den Modus der Bytecodeverifizierung fest\n    --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, damit <Zielmodul> ungeachtet der\n                      der Moduldeklaration gelesen wird. \n                      <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n                      Module zu lesen.\n    --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n                        in <Zielmodul> zu exportieren.\n                      <Zielmodul> kann ALL-UNNAMED sein, um in alle \n                      unbenannten Module zu exportieren.\n    --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n                      in <Zielmodul> zu \u00F6ffnen.\n    --disable-@files  Deaktiviert das weitere Einblenden der Argumentdatei\n    --patch-module <Modul>=<Datei>({0}<Datei>)*\n                      \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n                      oder -Verzeichnissen mit Klassen und Ressourcen.\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.
+java.launcher.X.usage=\n    -Xbatch           Deaktiviert Hintergrundkompilierung\n    -Xbootclasspath/a: <Durch {0} getrennte Verzeichnisse und ZIP-/JAR-Dateien>\n                      an Ende von Bootstrap Classpath anh\u00E4ngen\n    -Xcheck:jni       F\u00FChrt zus\u00E4tzliche Pr\u00FCfungen f\u00FCr JNI-Funktionen aus\n    -Xcomp            Erzwingt Kompilierung von Methoden beim ersten Aufruf\n    -Xdebug           Wird zur Abw\u00E4rtskompatiblit\u00E4t bereitgestellt\n    -Xdiag            Zeigt zus\u00E4tzliche Diagnosemeldungen an\n    -Xfuture          Aktiviert strengste Pr\u00FCfungen, wird als m\u00F6glicher zuk\u00FCnftiger Standardwert erwartet\n    -Xint             Nur Ausf\u00FChrung im interpretierten Modus\n    -Xinternalversion\n                      Zeigt detailliertere JVM-Versionsinformationen an als die\n                      Option "-version"\n    -Xloggc:<Datei>    Protokolliert GC-Status in einer Datei mit Zeitstempeln\n    -Xmixed           Ausf\u00FChrung im gemischten Modus (Standard)\n    -Xmn<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche und die maximale Gr\u00F6\u00DFe (in Byte) des Heaps\n                      f\u00FCr die junge Generation (Nursery) fest\n    -Xms<Gr\u00F6\u00DFe>        Legt die anf\u00E4ngliche Java-Heap-Gr\u00F6\u00DFe fest\n    -Xmx<Gr\u00F6\u00DFe>        Legt die maximale Java-Heap-Gr\u00F6\u00DFe fest\n    -Xnoclassgc       Deaktiviert die Klassen-Garbage Collection\n    -Xprof            Gibt CPU-Profilierungsdaten aus (veraltet)\n    -Xrs              Reduziert die Verwendung von BS-Signalen durch Java/VM (siehe Dokumentation)\n    -Xshare:auto      Verwendet, wenn m\u00F6glich, freigegebene Klassendaten (Standard)\n    -Xshare:off       Versucht nicht, freigegebene Klassendaten zu verwenden\n    -Xshare:on        Erfordert die Verwendung von freigegebenen Klassendaten, verl\u00E4uft sonst nicht erfolgreich.\n    -XshowSettings    Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:all\n                      Zeigt alle Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:locale\n                      Zeigt alle gebietsschemabezogenen Einstellungen an und f\u00E4hrt fort\n    -XshowSettings:properties\n                      Zeigt alle Eigenschaftseinstellungen an und f\u00E4hrt fort\n    -XshowSettings:vm Zeigt alle VM-bezogenen Einstellungen an und f\u00E4hrt fort\n    -Xss<Gr\u00F6\u00DFe>        Legt Stack-Gr\u00F6\u00DFe des Java-Threads fest\n    -Xverify          Legt den Modus der Bytecodeverifizierung fest\n    --add-reads <Modul>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, damit <Zielmodul> ungeachtet der\n                      Moduldeklaration gelesen wird. \n                      <Zielmodul> kann ALL-UNNAMED sein, um alle unbenannten\n                      Module zu lesen.\n    --add-exports <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n                        in <Zielmodul> zu exportieren.\n                      <Zielmodul> kann ALL-UNNAMED sein, um in alle \n                      unbenannten Module zu exportieren.\n    --add-opens <Modul>/<Package>=<Zielmodul>(,<Zielmodul>)*\n                      Aktualisiert <Modul>, um <Package> ungeachtet der Moduldeklaration\n                      in <Zielmodul> zu \u00F6ffnen.\n    --permit-illegal-access\n                      L\u00E4sst unzul\u00E4ssigen Zugriff f\u00FCr Mitglieder mit den Typen in den benannten Modulen\n                      nach Code in unbenannten Modulen zu. Diese Kompatibilit\u00E4tsoption wird\n                      im n\u00E4chsten Release entfernt.\n    --limit-modules <Modulname>[,<Modulname>...]\n                      Grenzt die Gesamtmenge der beobachtbaren Module ein\n   --patch-module <Modul>=<Datei>({0}<Datei>)*\n                      \u00DCberschreibt oder erweitert ein Modul in JAR-Dateien\n                      oder -Verzeichnissen mit \
+Klassen und Ressourcen.\n    --disable-@files  Deaktiviert die weitere Erweiterung von Argumentdateien\n\nDiese zus\u00E4tzlichen Optionen k\u00F6nnen ohne Vorank\u00FCndigung ge\u00E4ndert werden.
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nDie folgenden Optionen sind f\u00FCr Mac OS X spezifisch:\n    -XstartOnFirstThread\n                      main()-Methode f\u00FCr den ersten (AppKit) Thread ausf\u00FChren\n    -Xdock:name=<application name>\n                      Den im Dock angezeigten Standardanwendungsnamen \u00FCberschreiben\n    -Xdock:icon=<Pfad zu Symboldatei>\n                      Das im Dock angezeigte Standardsymbol \u00FCberschreiben\n\n
 
-java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden
+java.launcher.cls.error1=Fehler: Hauptklasse {0} konnte nicht gefunden oder geladen werden\nUrsache: {1}: {2}
 java.launcher.cls.error2=Fehler: Hauptmethode ist nicht {0} in Klasse {1}. Definieren Sie die Hauptmethode als:\n   public static void main(String[] args)
 java.launcher.cls.error3=Fehler: Hauptmethode muss einen Wert vom Typ void in Klasse {0} zur\u00FCckgeben. Definieren Sie \ndie Hauptmethode als:\n   public static void main(String[] args)
 java.launcher.cls.error4=Fehler: Hauptmethode in Klasse {0} nicht gefunden. Definieren Sie die Hauptmethode als:\n   public static void main(String[] args):\noder eine JavaFX-Anwendung muss {1} erweitern
 java.launcher.cls.error5=Fehler: Zum Ausf\u00FChren dieser Anwendung ben\u00F6tigte JavaFX-Runtime-Komponenten fehlen
+java.launcher.cls.error6=Fehler: Beim Laden der Klasse {0} ist ein LinkageError aufgetreten\n\t{1}
 java.launcher.jar.error1=Fehler: Beim Versuch, Datei {0} zu \u00F6ffnen, ist ein unerwarteter Fehler aufgetreten
 java.launcher.jar.error2=Manifest in {0} nicht gefunden
 java.launcher.jar.error3=kein Hauptmanifestattribut, in {0}
+java.launcher.jar.error4=Fehler beim Laden des Java-Agents in {0}
 java.launcher.init.error=Initialisierungsfehler
 java.launcher.javafx.error1=Fehler: Die JavaFX-Methode launchApplication hat die falsche Signatur, sie\nmuss als statisch deklariert werden und einen Wert vom Typ VOID zur\u00FCckgeben
 java.launcher.module.error1=Modul {0} weist kein MainClass-Attribut auf. Verwenden Sie -m <module>/<main-class>
 java.launcher.module.error2=Fehler: Hauptklasse {0} konnte in Modul {1} nicht gefunden oder geladen werden
+java.launcher.module.error3=Fehler: Hauptklasse {0} kann nicht aus Modul {1} geladen werden\n\t{2}
+java.launcher.module.error4={0} nicht gefunden
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,32 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Sintaxis: {0} [opciones] class [argumentos...]\n           (para ejecutar una clase)\n   o  {0} [opciones] -jar jarfile [argumentos...]\n           (para ejecutar un archivo jar)\n   o  {0} [opciones] -p <ruta_m\u00F3dulo> -m <nombre_m\u00F3dulo>[/<clase_principal>] [argumentos...]\n           (para ejecutar la clase principal en un m\u00F3dulo)\ndonde las opciones incluyen:\n\n
+java.launcher.opt.header  =   Sintaxis: {0} [opciones] <clase principal> [argumentos...]\n           (para ejecutar una clase)\n   o  {0} [opciones] -jar <archivo jar> [argumentos...]\n           (para ejecutar un archivo jar)\n   o  {0} [opciones] -m <m\u00F3dulo>[/<clase principal>] [argumentos...]\n       {0} [opciones] --module <m\u00F3dulo>[/<clase principal>] [argumentos...]\n           (para ejecutar la clase principal en un m\u00F3dulo)\n\n Argumentos que siguen la clase principal, -jar <archivo jar>, -m o --module\n <m\u00F3dulo>/<clase principal> se transfieren como argumentos a una clase principal.\n\n donde las opciones incluyen:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  Anticuada, se eliminar\u00E1 en una versi\u00F3n futura\n
 java.launcher.opt.vmselect   =\    {0}\t  para seleccionar la VM "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  es un sin\u00F3nimo de la VM "{1}" [anticuada]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =-cp <ruta de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n    -classpath <ruta de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n    --class-path <ruta de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n                  Lista separada por {0} de directorios, archivos JAR\n                  y archivos ZIP para buscar archivos de clase.\n    -p <ruta_m\u00F3dulo>\n    --module-path <ruta_m\u00F3dulo>...\n                  Lista separada por {0} de directorios, cada directorio\n                  es un directorio de m\u00F3dulos.\n    --upgrade-module-path <ruta_m\u00F3dulo>...\n                  Lista separada por {0} de directorios, cada directorio\n                  es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n                  actualizables en la imagen de tiempo de ejecuci\u00F3n\n    -m <m\u00F3dulo>[/<clase_principal>]\n    --module <nombre_m\u00F3dulo>[/<clase_principal>]\n                  m\u00F3dulo inicial que resolver y nombre de la clase principal\n                  que ejecutar si el m\u00F3dulo no la especifica\n    --add-modules <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n                  m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n                  <nombre_m\u00F3dulo> tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --limit-modules <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n                  limitar el universo de los m\u00F3dulos observables\n    --list-modules [<nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]]\n                  mostrar los m\u00F3dulos observables y salir\n    --dry-run     crear VM pero no ejecutar m\u00E9todo principal.\n                  Esta opci\u00F3n --dry-run puede ser \u00FAtil para validar las\n                  opciones de l\u00EDnea de comandos como la configuraci\u00F3n del sistema de m\u00F3dulo.\n    -D<nombre>=<valor>\n                  definir una propiedad del sistema\n    -verbose:[class|gc|jni]\n                  activar la salida detallada\n    -version      imprimir la versi\u00F3n del producto en el flujo de errores y salir\n    ---version      imprimir la versi\u00F3n del producto en el flujo de salida y salir\n    -showversion  imprimir la versi\u00F3n del producto en el flujo de errores y continuar\n    --show-version\n                  imprimir la versi\u00F3n del producto en el flujo de salida y continuar\n    -? -h -help\n                  imprimir este mensaje de ayuda en el flujo de errores\n    --help        imprimir este mensaje de ayuda en el flujo de salida\n    -X            imprimir la ayuda de opciones adicionales en el flujo de errores\n    --help-extra  imprimir la ayuda de opciones adicionales en el fujo de salida\n    -ea[:<nombre_paquete>...|:<nombre_clase>]\n    -enableassertions[:<nombre_paquete>...|:<nombre_clase>]\n                  activar afirmaciones con la granularidad especificada\n    -da[:<nombre_paquete>...|:<nombre_clase>]\n    -disableassertions[:<nombre_paquete>...|:<nombre_clase>]\n                  desactivar afirmaciones con la granularidad especificada\n    -esa | -enablesystemassertions\n                  activar afirmaciones del sistema\n    -dsa | -disablesystemassertions\n                  desactivar afirmaciones del sistema\n    -agentlib:<nombre_bib>[=<opciones>]\n                  cargar biblioteca de agentes nativos <nombre_bib>, por ejemplo, -agentlib:jdwp\n                  ver tambi\u00E9n -agentlib:jdwp=help\n    -agentpath:<nombre_ruta>[=<opciones>]\n                  cargar biblioteca de agentes nativos por nombre de ruta completo\n    -javaagent:<ruta_jar>[=<opciones>]\n                  cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n    -splash:<ruta_imagen>\n                  mostrar pantalla de presentaci\u00F3n con la imagen especificada\n                  Las im\u00E1genes a escala HiDPI est\u00E1n \
-soportadas y se usan autom\u00E1ticamente\n                  si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n                  siempre debe transferirse como el argumento en la opci\u00F3n -splash.\n                  La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n                  autom\u00E1ticamente.\n                  Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n    en<ruta_archivo>   leer opciones del archivo especificado\nPara especificar un argumento para una opci\u00F3n larga, puede usar --<nombre>=<valor> o\n--<nombre> <valor>.
+java.launcher.opt.footer = \    -cp <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n    -classpath <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n    --class-path <ruta de b\u00FAsqueda de clase de directorios y archivos zip/jar>\n                  Una lista separada por el car\u00E1cter {0}, archivos JAR\n                  y archivos ZIP para buscar archivos de clases.\n    -p <ruta m\u00F3dulo>\n    --module-path <ruta m\u00F3dulo>...\n                  Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n                  es un directorio de m\u00F3dulos.\n    --upgrade-module-path <ruta m\u00F3dulo>...\n                  Una lista de directorios separada por el car\u00E1cter {0}, cada directorio\n                  es un directorio de m\u00F3dulos que sustituye a\n                  los m\u00F3dulos actualizables en la imagen de tiempo de ejecuci\u00F3n\n    --add-modules <nombre m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n                  m\u00F3dulos de ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial.\n                  <nombre m\u00F3dulo> tambi\u00E9n puede ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  mostrar m\u00F3dulos observables y salir\n    --d <nombre m\u00F3dulo>\n    --describe-module <nombre m\u00F3dulo>\n                  describir un m\u00F3dulo y salir\n    --dry-run     crear VM y cargar la clase principal pero sin ejecutar el m\u00E9todo principal.\n                  La opci\u00F3n --dry-run puede ser \u00FAtil para validar\n                  las opciones de l\u00EDnea de comandos, como la configuraci\u00F3n del sistema de m\u00F3dulos.\n    --validate-modules\n                  validar todos los m\u00F3dulos y salir\n                  La opci\u00F3n --validate-modules puede ser \u00FAtil para encontrar\n                  conflictos y otros errores con m\u00F3dulos en la ruta de m\u00F3dulos.\n    -D<nombre>=<valor>\n                  definir una propiedad de sistema\n    -verbose:[class|module|gc|jni]\n                  activar la salida en modo verbose\n    -version      imprimir versi\u00F3n de producto en el flujo de errores y salir\n    --version     imprimir versi\u00F3n de producto en el flujo de salida y salir\n    -showversion  imprimir versi\u00F3n de producto en el flujo de errores y continuar\n    --show-version\n                  -showversion  imprimir versi\u00F3n de producto en el flujo de salida y continuar\n    --show-module-resolution\n                  mostrar la salida de resoluci\u00F3n de m\u00F3dulo durante el inicio\n    -? -h -help\n                  imprimir este mensaje de ayuda en el flujo de errores\n    --help        imprimir este mensaje de ayuda en el flujo de salida\n    -X            imprimir ayuda de opciones adicionales en el flujo de errores\n    --help-extra  imprimir ayuda de opciones adicionales en el flujo de salida\n    -ea[:<nombre paquete>...|:<nombre clase>]\n    -enableassertions[:<nombre paquete>...|:<nombre clase>]\n                  activar afirmaciones con una granularidad especificada\n    -da[:<nombre paquete>...|:<nombre clase>]\n    -disableassertions[:<nombre paquete>...|:<nombre clase>]\n                  desactivar afirmaciones con una granularidad especificada\n    -esa | -enablesystemassertions\n                  activar afirmaciones del sistema\n    -dsa | -disablesystemassertions\n                  desactivar afirmaciones del sistema\n    -agentlib:<nombre bib>[=<opciones>]\n                  cargar biblioteca de agente nativo <nombre bib>, por ejemplo, -agentlib:jdwp\n                  ver tambi\u00E9n -agentlib:jdwp=help\n    -agentpath:<nombre ruta>[=<opciones>]\n                  cargar biblioteca de agente nativo por nombre completo de ruta\n    -javaagent:<ruta jar>[=<opciones>]\n                  cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n    -splash:<ruta imagen>\n         \
+         mostrar pantalla de presentaci\u00F3n con imagen especificada\n                  Las im\u00E1genes a escala HiDPI est\u00E1n soportadas y se usan autom\u00E1ticamente\n                  si est\u00E1n disponibles. El nombre de archivo de la imagen sin escala, por ejemplo, image.ext,\n                  siempre debe transmitirse como el argumento para la opci\u00F3n -splash.\n                  La imagen a escala m\u00E1s adecuada que se haya proporcionado se escoger\u00E1\n                  autom\u00E1ticamente.\n                  Consulte la documentaci\u00F3n de la API de la pantalla de presentaci\u00F3n para obtener m\u00E1s informaci\u00F3n.\n    @argument files\n                  uno o m\u00E1s archivos de argumentos que contienen opciones\n    -disable-@files\n                  evitar una mayor expansi\u00F3n del archivo de argumentos\nPara especificar un argumento para una opci\u00F3n larga, puede usar --<nombre>=<valor> o\n--<nombre> <valor>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=-Xbatch           desactivar compilaci\u00F3n de fondo\n    -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n                      agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n    -Xcheck:jni       realizar comprobaciones adicionales para las funciones de JNI\n    -Xcomp            fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n    -Xdebug           se proporciona para ofrecer compatibilidad con versiones anteriores\n    -Xdiag            mostrar mensajes de diagn\u00F3stico adicionales\n    -Xdiag:resolver   mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n    -Xfuture          activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n    -Xint             solo ejecuci\u00F3n de modo interpretado\n    -Xinternalversion\n                      muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n                      opci\u00F3n -version\n    -Xloggc:    registrar el estado de GC en un archivo con registros de hora\n    -Xmixed           ejecuci\u00F3n de modo mixto (por defecto)\n    -Xmn<tama\u00F1o>        define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n                      para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n    -Xms<size>        define el tama\u00F1o inicial de la pila de Java\n    -Xmx<size>        define el tama\u00F1o m\u00E1ximo de la pila de Java\n    -Xnoclassgc       desactivar la recolecci\u00F3n de basura de clases\n    -Xprof            datos de creaci\u00F3n de perfiles de CPU de salida\n    -Xrs              reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n    -Xshare:auto      usar datos de clase compartidos si es posible (valor por defecto)\n    -Xshare:off       no intentar usar datos de clase compartidos\n    -Xshare:on        es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n    -XshowSettings    mostrar toda la configuraci\u00F3n y continuar\n    -XshowSettings:all\n                      mostrar todos los valores y continuar\n    -XshowSettings:locale\n                      mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n    -XshowSettings:properties\n                      mostrar todos los valores de propiedad y continuar\n    -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n    -Xss<tama\u00F1o>        definir tama\u00F1o de la pila del thread de Java\n    -Xverify          define el modo del verificador de c\u00F3digo de bytes\n    --add-reads <m\u00F3dulo>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para leer <m\u00F3dulo-destino>, independientemente\n                      de la declaraci\u00F3n del m\u00F3dulo. \n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para leer todos los\n                      m\u00F3dulos sin nombre.\n    --add-exports <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para exportar <paquete> en <m\u00F3dulo-destino>,\n                      independientemente de la declaraci\u00F3n del m\u00F3dulo.\n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para exportar a todos los\n                      m\u00F3dulos sin nombre.\n    --add-opens <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para abrir <paquete> en\n                      <m\u00F3dulo-destino>, independientemente de la declaraci\u00F3n del m\u00F3dulo.\n    --disable-@files  desactivar la ampliaci\u00F3n de archivos de m\u00E1s argumentos\n    --patch-module <m\u00F3dulo>=({0})*\n                      Aumentar o anular un m\u00F3dulo con clases y recursos\n                      en directorios o archivos JAR\n\nEstas opciones \
-son adicionales y est\u00E1n sujetas a cambio sin previo aviso.
+java.launcher.X.usage=\    -Xbatch           desactivar compilaci\u00F3n de fondo\n    -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n                      agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n    -Xcheck:jni       realizar comprobaciones adicionales para las funciones de JNI\n    -Xcomp            fuerza la compilaci\u00F3n de m\u00E9todos en la primera llamada\n    -Xdebug           se proporciona para ofrecer compatibilidad con versiones anteriores\n    -Xdiag            mostrar mensajes de diagn\u00F3stico adicionales\n    -Xfuture          activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n    -Xint             solo ejecuci\u00F3n de modo interpretado\n    -Xinternalversion\n                      muestra una informaci\u00F3n de la versi\u00F3n de JVM m\u00E1s detallada que la\n                      opci\u00F3n -version\n    -Xloggc:<archivo>    registrar el estado de GC en un archivo con registros de hora\n    -Xmixed           ejecuci\u00F3n de modo mixto (por defecto)\n    -Xmn<size>        define el tama\u00F1o inicial y m\u00E1ximo (en bytes) de la pila\n                      para la generaci\u00F3n m\u00E1s joven (espacio infantil)\n    -Xms<size>        define el tama\u00F1o inicial de la pila de Java\n    -Xmx<size>        define el tama\u00F1o m\u00E1ximo de la pila de Java\n    -Xnoclassgc       desactivar la recolecci\u00F3n de basura de clases\n    -Xprof            datos de creaci\u00F3n de perfiles de CPU de salida (anticuados)\n    -Xrs              reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n    -Xshare:auto      usar datos de clase compartidos si es posible (valor por defecto)\n    -Xshare:off       no intentar usar datos de clase compartidos\n    -Xshare:on        es obligatorio el uso de datos de clase compartidos, de lo contrario se producir\u00E1 un fallo.\n    -XshowSettings    mostrar toda la configuraci\u00F3n y continuar\n    -XshowSettings:all\n                      mostrar todos los valores y continuar\n    -XshowSettings:locale\n                      mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n    -XshowSettings:properties\n                      mostrar todos los valores de propiedad y continuar\n    -XshowSettings:vm mostrar todos los valores relacionados con vm y continuar\n    -Xss<size>        definir tama\u00F1o de la pila del thread de Java\n    -Xverify          define el modo del verificador de c\u00F3digo de bytes\n    --add-reads <m\u00F3dulo>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para leer <m\u00F3dulo-destino>, independientement\n                      de la declaraci\u00F3n del m\u00F3dulo. \n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para leer todos los\n                      m\u00F3dulos sin nombre.\n    --add-exports <m\u00F3dulo>/<paquete>=<modulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para exportar <paquete> en <m\u00F3dulo-destino>,\n                      independientemente de la declaraci\u00F3n del m\u00F3dulo.\n                      <m\u00F3dulo-destino> puede ser ALL-UNNAMED para exportar a todos los\n                      m\u00F3dulos sin nombre.\n    --add-opens <m\u00F3dulo>/<paquete>=<m\u00F3dulo-destino>(,<m\u00F3dulo-destino>)*\n                      actualiza <m\u00F3dulo> para abrir <paquete> en\n                      <m\u00F3dulo-destino>, independientemente de la declaraci\u00F3n del m\u00F3dulo.\n    --permit-illegal-access\n                      permitir el acceso no v\u00E1lido a miembros de tipos en m\u00F3dulos con nombre\n                      por c\u00F3digo en m\u00F3dulos sin nombre. Esta opci\u00F3n de compatibilidad\n                      se eliminar\u00E1 en la pr\u00F3xima versi\u00F3n.\n    --limit-modules <nombre \
+m\u00F3dulo>[,<nombre m\u00F3dulo>...]\n                      limitar el universo de m\u00F3dulos observables\n    --patch-module <m\u00F3dulo>=<archivo>({0}<archivo>)*\n                      anular o aumentar un m\u00F3dulo con clases y recursos\n                      en directorios o archivos JAR.\n    --disable-@files  desactivar una mayor expansi\u00F3n del archivo de argumentos\n\nEstas opciones adicionales est\u00E1n sujetas a cambios sin previo aviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLas siguientes opciones son espec\u00EDficas para Mac OS X:\n    -XstartOnFirstThread\n                      ejecutar el m\u00E9todo main() del primer thread (AppKit)\n    -Xdock:name=<application name>\n                      sustituir al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n    -Xdock:icon=<ruta de acceso a archivo de icono>\n                      sustituir al icono por defecto que se muestra en el Dock\n\n
 
-java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0}
+java.launcher.cls.error1=Error: no se ha encontrado o cargado la clase principal {0}\nCausado por: {1}: {2}
 java.launcher.cls.error2=Error: el m\u00E9todo principal no es {0} en la clase {1}, defina el m\u00E9todo principal del siguiente modo:\n   public static void main(String[] args)
 java.launcher.cls.error3=Error: el m\u00E9todo principal debe devolver un valor del tipo void en la clase {0}, \ndefina el m\u00E9todo principal del siguiente modo:\n   public static void main(String[] args)
 java.launcher.cls.error4=Error: no se ha encontrado el m\u00E9todo principal en la clase {0}, defina el m\u00E9todo principal del siguiente modo:\\n   public static void main(String[] args)\\nde lo contrario, se deber\u00E1 ampliar una clase de aplicaci\u00F3n JavaFX {1}
 java.launcher.cls.error5=Error: faltan los componentes de JavaFX runtime y son necesarios para ejecutar esta aplicaci\u00F3n
+java.launcher.cls.error6=Error: Se ha producido un error de enlace al cargar la clase principal {0}\n\t{1}
 java.launcher.jar.error1=Error: se ha producido un error inesperado al intentar abrir el archivo {0}
 java.launcher.jar.error2=no se ha encontrado el manifiesto en {0}
 java.launcher.jar.error3=no hay ning\u00FAn atributo de manifiesto principal en {0}
+java.launcher.jar.error4=error al cargar el agente de java en {0}
 java.launcher.init.error=error de inicializaci\u00F3n
 java.launcher.javafx.error1=Error: el m\u00E9todo launchApplication de JavaFX tiene una firma que no es correcta.\\nSe debe declarar est\u00E1tico y devolver un valor de tipo nulo
 java.launcher.module.error1=el m\u00F3dulo {0} no tiene ning\u00FAn atributo MainClass, utilice -m <m\u00F3dulo>/<clase-principal>
 java.launcher.module.error2=Error: no se ha encontrado o cargado la clase principal {0} en el m\u00F3dulo {1}
+java.launcher.module.error3=Error: No se ha podido cargar la clase principal {0} del m\u00F3dulo {1}\n\t{2}
+java.launcher.module.error4=No se ha encontrado {0}
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,32 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Syntaxe : {0} [options] class [args...]\n           (pour l''ex\u00E9cution d''une classe)\n   ou  {0} [options] -jar jarfile [args...]\n           (pour l''ex\u00E9cution d''un fichier JAR)\n   ou  {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (pour l''ex\u00E9cution de la classe principale dans un module)\n\no\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n
+java.launcher.opt.header  =   Syntaxe : {0} [options] <mainclass> [args...]\n           (pour ex\u00E9cuter une classe)\n   ou  {0} [options] -jar <jarfile> [args...]\n           (pour ex\u00E9cuter un fichier JAR)\n   ou  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (pour ex\u00E9cuter la classe principale dans un module)\n\n Les arguments suivant la classe principale -jar <jarfile>, -m ou --module\n <module>/<mainclass> sont transmis en tant qu''arguments \u00E0 la classe principale.\n\n o\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  En phase d''abandon, sera enlev\u00E9 dans une version future\n
 java.launcher.opt.vmselect   =\    {0}\t  pour s\u00E9lectionner la machine virtuelle "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  est un synonyme pour la machine virtuelle "{1}"  [en phase d''abandon]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    --class-path <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n                  Liste de r\u00E9pertoires, d''archives JAR\n                  et d''archives ZIP s\u00E9par\u00E9s par des {0} dans laquelle rechercher les fichiers de classe.\n    -p <chemin de module>\n    --module-path <chemin de module>...\n                  Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules.\n    --upgrade-module-path <chemin de module>...\n                  Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules qui remplacent des modules\n                  pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n    -m <module>[/<mainclass>]\n    --module <modulename>[/<mainclass>]\n                  module initial \u00E0 r\u00E9soudre et nom de la classe principale\n                  \u00E0 ex\u00E9cuter si elle n''est pas indiqu\u00E9e par le module\n    --add-modules <modulename>[,<modulename>...]\n                  modules racine \u00E0 r\u00E9soudre en plus du module initial.\n                  <modulename> peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --limit-modules <modulename>[,<modulename>...]\n                  limitation de l''univers de modules observables\n    --list-modules [<modulename>[,<modulename>...]]\n                  \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n    --dry-run     cr\u00E9e une machine virtuelle mais n''ex\u00E9cute pas la m\u00E9thode principale.\n                  Cette option --dry-run peut s''av\u00E9rer utile pour la validation des\n                  options de ligne de commandes telles que la configuration syst\u00E8me de module.\n    -D<name>=<value>\n                  d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n    -verbose:[class|gc|jni]\n                  activation de la sortie en mode verbose\n    -version      affichage de la version du produit dans le flux d''erreur et fin de l''op\u00E9ration\n    --version     affichage de la version du produit dans le flux de sortie et fin de l''op\u00E9ration\n    -showversion  affichage de la version du produit dans le flux d''erreur et poursuite de l''op\u00E9ration\n    --show-version\n                  affichage de la version du produit dans le flux de sortie et poursuite de l''op\u00E9ration\n    -? -h -help\n                  affichage de ce message d''aide dans le flux d''erreur\n    --help        affichage de ce message d''aide dans le flux de sortie\n    -X            affichage de l''aide sur les options suppl\u00E9mentaires dans le flux d''erreur\n    --help-extra  affichage de l''aide sur les options suppl\u00E9mentaires dans le flux de sortie\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  activation des assertions avec la granularit\u00E9 indiqu\u00E9e\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  d\u00E9sactivation des assertions avec la granularit\u00E9 indiqu\u00E9e\n    -esa | -enablesystemassertions\n                  activation des assertions syst\u00E8me\n    -dsa | -disablesystemassertions\n                  d\u00E9sactivation des assertions syst\u00E8me\n    -agentlib:<libname>[=<options>]\n                  chargement de la biblioth\u00E8que d''agents natifs <libname>, par exemple : -agentlib:jdwp\n                  voir aussi -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  chargement de la biblioth\u00E8que d''agents natifs via le chemin d''acc\u00E8s complet\n    \
--javaagent:<jarpath>[=<options>]\n                  chargement de l''agent de langage de programmation Java, voir java.lang.instrument\n    -splash:<imagepath>\n                  affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n                  Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n                  si elles sont disponibles. Le nom de fichier d''une image non redimensionn\u00E9e, par ex. image.ext,\n                  doit toujours \u00EAtre transmis comme argument \u00E0 l''option -splash.\n                  L''image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n                  s\u00E9lectionn\u00E9e.\n                  Pour plus d''informations, reportez-vous \u00E0 la documentation relative \u00E0 l''API SplashScreen.\n    @<filepath>   lecture des options \u00E0 partir du fichier indiqu\u00E9\n\nPour indiquer un argument pour une option longue, vous pouvez utiliser --<name>=<value> ou\n--<name> <value>.\n
+java.launcher.opt.footer = \    -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    --class-path <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n                  Liste distincte {0} de r\u00E9pertoires, d''archives JAR\n                  et d'archives ZIP pour rechercher des fichiers de classe.\n    -p <chemin de module>\n    --module-path <chemin de module>...\n                  Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules.\n    --upgrade-module-path <chemin de module>...\n                  Liste distincte {0} de r\u00E9pertoires, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de module qui remplace les modules\n                  pouvant \u00EAtre mis \u00E0 niveau dans l'image d'ex\u00E9cution\n    --add-modules <nom de module>[,<nom de module>...]\n                  modules racine \u00E0 r\u00E9soudre en plus du module initial.\n                  <nom de module> peut \u00E9galement \u00EAtre ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  r\u00E9pertorier les modules observables et quitter\n    --d <nom de module>\n    --describe-module <nom de module>\n                  d\u00E9crire un module et quitter\n    --dry-run     cr\u00E9er une machine virtuelle et charger la classe principale mais ne pas ex\u00E9cuter la m\u00E9thode principale.\n                  L'option--dry-run peut \u00EAtre utile pour la validation des\n                  options de ligne de commande telles que la configuration syst\u00E8me de module.\n    --validate-modules\n                  valider tous les modules et quitter\n                  L'option --validate-modules peut \u00EAtre utile pour la recherche de\n                  conflits et d'autres erreurs avec des modules dans le chemin de module.\n    -D<name>=<value>\n                  d\u00E9finir une propri\u00E9t\u00E9 syst\u00E8me\n    -verbose:[class|module|gc|jni]\n                  activer la sortie en mode verbose\n    -version      afficher la version de produit dans le flux d'erreur et quitter\n    --version     afficher la version de produit dans le flux de sortie et quitter\n    -showversion  afficher la version de produit dans le flux d'erreur et continuer\n    --show-version\n                  afficher la version de produit dans le flux de sortie et continuer\n    --show-module-resolution\n                  afficher la sortie de r\u00E9solution de module lors du d\u00E9marrage\n    -? -h -help\n                  afficher ce message d'aide dans le flux d'erreur\n    --help        afficher ce message d'erreur dans le flux de sortie\n    -X            afficher l'aide sur des options suppl\u00E9mentaires dans le flux d'erreur\n    --help-extra  afficher l'aide sur des options suppl\u00E9mentaires dans le flux de sortie\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  activer des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  d\u00E9sactiver des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -esa | -enablesystemassertions\n                  activer des assertions syst\u00E8me\n    -dsa | -disablesystemassertions\n                  d\u00E9sactiver des assertions syst\u00E8me\n    -agentlib:<libname>[=<options>]\n                  charger la biblioth\u00E8que d'agent natif <libname>, par ex. -agentlib:jdwp\n                  voir \u00E9galement -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  charger la biblioth\u00E8que d'agent natif par nom de chemin complet\n    -javaagent:<jarpath>[=<options>]\n                  charger l'agent de langage de programmation, voir \
+java.lang.instrument\n    -splash:<imagepath>\n                  afficher l'\u00E9cran d'accueil avec l'image indiqu\u00E9e\n                  Les images redimensionn\u00E9es HiDPI sont automatiquement prises en charge et utilis\u00E9es\n                  si elles sont disponibles. Le nom de fichier d'une image non redimensionn\u00E9e, par ex. image.ext,\n                  doit toujours \u00EAtre transmis comme argument \u00E0 l'option -splash.\n                  L'image redimensionn\u00E9e fournie la plus appropri\u00E9e sera automatiquement\n                  s\u00E9lectionn\u00E9e.\n                  Pour plus d'informations, reportez-vous \u00E0 la documentation relative \u00E0 l'API SplashScreen\n    fichiers @argument\n                  fichiers d'arguments contenant des options\n    -disable-@files\n                  emp\u00EAcher le d\u00E9veloppement suppl\u00E9mentaire de fichiers d'arguments\nAfin d'indiquer un argument pour une option longue, vous pouvez utiliser --<name>=<value> ou\n--<name> <value>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           d\u00E9sactivation de la compilation en arri\u00E8re-plan\n    -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n                      ajout \u00E0 la fin du chemin de classe bootstrap\n    -Xcheck:jni        ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n    -Xcomp            force la compilation de m\u00E9thodes au premier appel\n    -Xdebug           fourni pour la compatibilit\u00E9 amont\n    -Xdiag            affichage de messages de diagnostic suppl\u00E9mentaires\n    -Xdiag:resolver   affichage de messages de diagnostic du r\u00E9solveur\n    -Xfuture           activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n    -Xint             ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n    -Xinternalversion\n                      affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n                      l''option -version\n    -Xloggc:<file>    journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n    -Xmixed           ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n    -Xmn<size>        d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n                      pour la jeune g\u00E9n\u00E9ration (nursery)\n    -Xms<size>        d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n    -Xmx<size>        d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n    -Xnoclassgc       d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n    -Xprof            sortie des donn\u00E9es de profilage d''UC\n    -Xrs              r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n    -Xshare:auto      utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n    -Xshare:off       aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n    -Xshare:on        utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration\n    -XshowSettings    affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:all\n                      affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:locale\n                      affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n    -XshowSettings:properties\n                       affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n    -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n    -Xss<size>        d\u00E9finition de la taille de pile de threads Java\n    -Xverify          d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour lire <target-module>, sans tenir compte\n                      de la d\u00E9claration de module. \n                      <target-module> peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n                      sans nom.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour exporter <package> vers <target-module>,\n                      sans tenir compte de la d\u00E9claration de module.\n                      <target-module> peut \u00EAtre ALL-UNNAMED pour effectuer un export vers tous\n                      les modules sans nom.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour ouvrir <package> vers\n                      \
-<target-module>, sans tenir compte de la d\u00E9claration de module\n    --disable-@files  d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n    --patch-module <module>=<file>({0}<file>)*\n                      Remplacement ou augmentation d''un module avec des classes et des ressources\n                      dans des fichiers ou des r\u00E9pertoires JAR.\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n
+java.launcher.X.usage=\n    -Xbatch           d\u00E9sactivation de la compilation en arri\u00E8re-plan\n    -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n                      ajout \u00E0 la fin du chemin de classe bootstrap\n    -Xcheck:jni       ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n    -Xcomp            force la compilation de m\u00E9thodes au premier appel\n    -Xdebug           fourni pour la compatibilit\u00E9 amont\n    -Xdiag            affichage de messages de diagnostic suppl\u00E9mentaires\n    -Xfuture          activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n    -Xint             ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n    -Xinternalversion\n                      affiche des informations de version JVM plus d\u00E9taill\u00E9es que\n                      l''option -version\n    -Xloggc:<file>    journalisation du statut de l''op\u00E9ration de ramasse-miette dans un fichier avec horodatage\n    -Xmixed           ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n    -Xmn<size>        d\u00E9finit les tailles initiale et maximale (en octets) de la portion de m\u00E9moire\n                      pour la jeune g\u00E9n\u00E9ration (nursery)\n    -Xms<size>        d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n    -Xmx<size>        d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n    -Xnoclassgc       d\u00E9sactivation de l''op\u00E9ration de ramasse-miette de la classe\n    -Xprof            sortie des donn\u00E9es de profilage d''UC (en phase d''abandon)\n    -Xrs              r\u00E9duction de l''utilisation des signaux OS par Java/la machine virtuelle (voir documentation)\n    -Xshare:auto      utilisation des donn\u00E9es de classe partag\u00E9es si possible (valeur par d\u00E9faut)\n    -Xshare:off       aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9es\n    -Xshare:on         utilisation des donn\u00E9es de classe partag\u00E9es obligatoire ou \u00E9chec de l''op\u00E9ration.\n    -XshowSettings    affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:all\n                      affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:locale\n                      affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n    -XshowSettings:properties\n                      affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n    -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n    -Xss<size>        d\u00E9finition de la taille de pile de threads Java\n    -Xverify          d\u00E9finit le mode du v\u00E9rificateur de code ex\u00E9cutable\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour lire <target-module>, sans tenir compte\n                      de la d\u00E9claration de module. \n                      <target-module> peut \u00EAtre ALL-UNNAMED pour lire tous les modules\n                      sans nom.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour exporter <package> vers <target-module>,\n                      sans tenir compte de la d\u00E9claration de module.\n                      <target-module> peut \u00EAtre ALL-UNNAMED pour exporter tous les\n                      modules sans nom.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      met \u00E0 jour <module> pour ouvrir <package> dans\n                      <target-module>, sans tenir compte de la d\u00E9claration de module.\n    --permit-illegal-access\n                      autoriser l''acc\u00E8s non autoris\u00E9 \u00E0 des \
+membres de types dans des modules nomm\u00E9s\n                      par code dans des modules sans nom. Cette option de compatibilit\u00E9 sera\n                      enlev\u00E9e dans la prochaine version.\n    --limit-modules <nom de module>[,<nom de module>...]\n                      limiter l''univers de modules observables\n    --patch-module <module>=<file>({0}<file>)*\n                      Remplacement ou augmentation d''un module avec des classes et des ressources\n                      dans des fichiers ou des r\u00E9pertoires JAR.\n    --disable-@files  d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n\nCes options suppl\u00E9mentaires peuvent \u00EAtre modifi\u00E9es sans pr\u00E9avis.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLes options suivantes sont propres \u00E0 Mac OS X :\n    -XstartOnFirstThread\n                      ex\u00E9cute la m\u00E9thode main() sur le premier thread (AppKit)\n    -Xdock:name=<nom d'application>\n                      remplace le nom d'application par d\u00E9faut affich\u00E9 dans l'ancrage\n    -Xdock:icon=<chemin vers le fichier d'ic\u00F4ne>\n                      remplace l'ic\u00F4ne par d\u00E9faut affich\u00E9e dans l'ancrage\n\n
 
-java.launcher.cls.error1=Erreur : impossible de trouver ou charger la classe principale {0}
+java.launcher.cls.error1=Erreur : impossible de trouver ou de charger la classe principale {0}\nCaus\u00E9 par : {1}: {2}
 java.launcher.cls.error2=Erreur : la m\u00E9thode principale n''est pas {0} dans la classe {1}, d\u00E9finissez la m\u00E9thode principale comme suit :\n   public static void main(String[] args)
 java.launcher.cls.error3=Erreur : la m\u00E9thode principale doit renvoyer une valeur de type void dans la classe {0}, \nd\u00E9finissez la m\u00E9thode principale comme suit :\n   public static void main(String[] args)
 java.launcher.cls.error4=Erreur : la m\u00E9thode principale est introuvable dans la classe {0}, d\u00E9finissez la m\u00E9thode principale comme suit :\n   public static void main(String[] args)\nou une classe d''applications JavaFX doit \u00E9tendre {1}
 java.launcher.cls.error5=Erreur : des composants d'ex\u00E9cution JavaFX obligatoires pour ex\u00E9cuter cette application sont manquants.
+java.launcher.cls.error6=Erreur : LinkageError lors du chargement de la classe principale {0}\n\t{1}
 java.launcher.jar.error1=Erreur : une erreur inattendue est survenue lors de la tentative d''ouverture du fichier {0}
 java.launcher.jar.error2=fichier manifeste introuvable dans {0}
 java.launcher.jar.error3=aucun attribut manifest principal dans {0}
+java.launcher.jar.error4=erreur lors du chargement de l''agent Java dans {0}
 java.launcher.init.error=erreur d'initialisation
 java.launcher.javafx.error1=Erreur : la signature de la m\u00E9thode launchApplication JavaFX est incorrecte, la\nm\u00E9thode doit \u00EAtre d\u00E9clar\u00E9e statique et renvoyer une valeur de type void
 java.launcher.module.error1=le module {0} n''a pas d''attribut MainClass, utilisez -m <module>/<main-class>
 java.launcher.module.error2=Erreur : impossible de trouver ou charger la classe principale {0} dans le module {1}
+java.launcher.module.error3=Erreur : impossible de charger la classe principale {0} \u00E0 partir du module {1}\n\t{2}
+java.launcher.module.error4={0} introuvable
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,31 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Uso: {0} [opzioni] class [argomenti...]\n           (per eseguire una classe)\n   oppure {0} [opzioni] -jar jarfile [argomenti...]\n           (per eseguire un file jar)\n   oppure {0} [opzioni] -p <percorsomodulo> -m <nomemodulo>[/<classeprincipale>] [argomenti...]\n           (per eseguire la classe principale in un modulo)\ndove opzioni include:\n\n
+java.launcher.opt.header  =   Uso: {0} [opzioni] <classe principale> [argomenti...]\n           (per eseguire una classe)\n   oppure  {0} [opzioni] -jar <file jar> [argomenti...]\n           (per eseguire un file jar)\n   oppure  {0} [opzioni] -m <modulo>[/<classe principale>] [argomenti...]\n       {0} [opzioni] --module <modulo>[/<classe principale>] [argomenti...]\n           (per eseguire la classe principale in un modulo)\n\n Gli argomenti specificati dopo la classe principale, dopo -jar <file jar>, -m o --module\n <modulo>/<classe principale> vengono passati come argomenti alla classe principale.\n\n dove opzioni include:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  opzione non pi\u00F9 valida; verr\u00E0 rimossa in una release futura\n
 java.launcher.opt.vmselect   =\    {0}\t  per selezionare la VM "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E8 un sinonimo per la VM "{1}" [non valido]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <classpath di ricerca di directory e file zip/jar>\n    -classpath <classpath di ricerca di directory e file zip/jar>\n    --class-path <classpath di ricerca di directory e file zip/jar>\n               Lista separata da {0} di directory, archivi JAR\n                  e archivi ZIP utilizzata per la ricerca di file di classe.\n    -p <percorso modulo>\n    -module-path <percorso modulo>...\n                  Lista separata da {0} di directory; ciascuna directory\n                  \u00E8 una directory di moduli.\n    -upgrade-module-path <percorso modulo>...\n                  Lista separata da {0} di directory; ciascuna directory\n                  \u00E8 una directory dei moduli che sostituiscono i moduli\n                  aggiornabili nell''immagine in fase di esecuzione.\n    -m <modulo>[/<classe principale>]\n    --module <nome modulo>[/<classe principale>]\n                  Il modulo iniziale da risolvere e il nome della classe\n                  principale da eseguire se non specificata dal modulo.\n    -add-modules <nome modulo>[,<nome modulo>...]\n                  Moduli root da risolvere in aggiunta al modulo iniziale.\n                  <nome modulo> pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    -limit-modules <nome modulo>[,<nome modulo>...]\n                  Limita l''universe dei moduli osservabili.\n    -list-modules[:<nome modulo>[,<nome modulo>...]]\n                  Elenca i moduli osservabili ed esce.\n    --dry-run     Crea la VM ma non esegue il metodo principale.\n                  Pu\u00F2 essere utile, ad esempio, per la convalida delle opzioni della\n                  riga di comando utilizzate per la configurazione del sistema di moduli.\n    -D<nome>=<valore>\n                  Imposta una propriet\u00E0 di sistema.\n    -verbose:[class|gc|jni]\n                  Abilita l''output descrittivo.\n    -version      Visualizza la versione del prodotto ed esce.\n    --version     Visualizza la versione del prodotto nel flusso di output ed esce.\n    -showversion  Visualizza la versione del prodotto nel flusso di errori e continua.\n    --show-version\n                  Visualizza la versione del prodotto nel flusso di output e continua.\n    -? -h -help\n                  Visualizza questo messaggio della Guida nel flusso di errori.\n    --help        Visualizza questo messaggio della Guida nel flusso di output.\n    -X            Visualizza la Guida relativa alle opzioni non standard nel flusso di errori.\n    --help-extra  Visualizza la Guida relativa alle opzioni non standard nel flusso di output.\n    -ea[:<nome package>...|:<nome classe>]\n    -enableassertions[:<nome package>...|:<nome classe>]\n                  Abilita le asserzioni con la granularit\u00E0 specificata.\n    -da[:<nome package>...|:<nome classe>]\n    -disableassertions[:<nome package>...|:<nome classe>]\n                  Disabilita le asserzioni con la granularit\u00E0 specificata.\n    -esa | -enablesystemassertions\n                  Abilita le asserzioni di sistema.\n    -dsa | -disablesystemassertions\n                  Disabilita le asserzioni di sistema.\n    -agentlib:<nome libreria>[=<opzioni>]\n                  Carica la libreria agenti nativa <nome libreria>, ad esempio -agentlib:jdwp.\n                  Vedere anche -agentlib:jdwp=help.\n    -agentpath:<nome percorso>[=<opzioni>]\n                  Carica la libreria agenti nativa con il percorso completo.\n    -javaagent:<percorso jar>[=<opzioni>]\n                  Carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument.\n    -splash:<percorso immagine>\n                  Mostra la schermata iniziale con l''immagine specificata.\n                  Le immagini ridimensionate HiDPI sono supportate e utilizzate automaticamente\n                  se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n                  devono \
-essere sempre passati come argomenti all''opzione -splash.\n                  Verr\u00E0 scelta automaticamente l''immagine ridimensionata pi\u00F9 appropriata\n                  fornita.\n                  Per ulteriori informazioni, vedere la documentazione relativa all''API SplashScreen.\n    @<percorso file>   Legge le opzioni dal file specificato.\n\nPer specificare un argomento per un''opzione lunga, \u00E8 possibile utilizzare --<nome>=<valore> o\n--<nome> <valore>.\n
+java.launcher.opt.footer = \    -cp <classpath di ricerca di directory e file zip/jar>\n    -classpath <classpath di ricerca di directory e file zip/jar>\n    -class-path <classpath di ricerca di directory e file zip/jar>\n                  Una lista separata da {0} di directory, archivi JAR\n                  e archivi ZIP in cui cercare i file di classe.\n    -p <percorso modulo>\n    --module-path <percorso modulo>...\n                  Una lista separata da {0} di directory. Ogni directory\n                  \u00E8 una directory di moduli.\n    --upgrade-module-path <percorso modulo>...\n                  Una lista separata da {0} di directory. Ogni directory\n                  \u00E8 una directory di moduli che sostituiscono i moduli\n                  aggiornabili nell'immagine in fase di esecuzione\n    --add-modules <nome modulo>[,<nome modulo>...]\n                  I moduli radice da risolvere in aggiunta al modulo iniziale.\n                  <nome modulo> pu\u00F2 essere anche ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  Elenca i moduli osservabili ed esce\n    --d <nome modulo>\n    --describe-module <nome modulo>\n                  Descrive un modulo ed esce\n    --dry-run      Crea la VM e carica la classe principale ma non esegue il metodo principale.\n                  L'opzione --dry-run pu\u00F2 essere utile per la convalida delle\n                  opzioni della riga di comando, ad esempio quelle utilizzate per la configurazione del sistema di moduli.\n    --validate-modules\n                  Convalida tutti i moduli ed esce\n                  L'opzione --validate-modules pu\u00F2 essere utile per rilevare\n                  conflitti e altri errori con i moduli nel percorso dei moduli.\n    -D<nome>=<valore>\n                  Imposta una propriet\u00E0 di sistema\n    -verbose:[class|module|gc|jni]\n                  abilitare output descrittivo\n    -version      Visualizza la versione del prodotto nel flusso di errori ed esce\n    -version      Visualizza la versione del prodotto nel flusso di output ed esce\n    -showversion      Visualizza la versione del prodotto nel flusso di errori e continua\n    --show-version\n                  Visualizza la versione del prodotto nel flusso di output e continua\n    --show-module-resolution\n                  Mostra l'output della risoluzione del modulo durante l'avvio\n    -? -h -help\n                  Visualizza questo messaggio della Guida nel flusso di errori\n    --help        Visualizza questo messaggio della Guida nel flusso di output\n    -X            Visualizza la Guida relativa alle opzioni non standard nel flusso di errori\n    --help-extra  Visualizza la Guida relativa alle opzioni non standard nel flusso di output\n    -ea[:<nome package>...|:<nome classe>]\n    -enableassertions[:<nome package>...|:<nome classe>]\n                  Abilita le asserzioni con la granularit\u00E0 specificata\n    -da[:<nome package>...|:<nome classe>]\n    -disableassertions[:<nome package>...|:<nome classe>]\n                  Disabilita le asserzioni con la granularit\u00E0 specificata\n    -esa | -enablesystemassertions\n                  Abilita le asserzioni di sistema\n    -dsa | -disablesystemassertions\n                  Disabilita le asserzioni di sistema\n    -agentlib:<nome libreria>[=<opzioni>]\n                  Carica la libreria agenti nativa <nome libreria>, ad esempio -agentlib:jdwp\n                  Vedere anche -agentlib:jdwp=help\n    -agentpath:<nome percorso>[=<opzioni>]\n                  Carica la libreria agenti nativa con il percorso completo\n    -javaagent:<percorso jar>[=<opzioni>]\n                  Carica l'agente del linguaggio di programmazione Java, vedere java.lang.instrument\n    -splash:<percorso immagine>\n                  Mostra la schermata iniziale con l'immagine specificata\n                  Le immagini ridimensionate HiDPI sono supportate e utilizzate \
+automaticamente\n                  se disponibili. I nomi file delle immagini non ridimensionate, ad esempio image.ext,\n                  devono essere sempre passati come argomenti all'opzione -splash.\n                  Verr\u00E0 scelta automaticamente l'immagine ridimensionata pi\u00F9 appropriata\n                  fornita.\n                  Per ulteriori informazioni, vedere la documentazione relativa all'API SplashScreen\n    @file argomenti\n                  Uno o pi\u00F9 file argomenti contenenti opzioni\n    -disable-@files\n                  Impedisce l'ulteriore espansione di file argomenti\nPer specificare un argomento per un'opzione lunga, \u00E8 possibile usare --<nome>=<valore> oppure\n--<nome> <valore>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           Disabilita la compilazione in background.\n    -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n                      Aggiunge alla fine del classpath di bootstrap.\n   -Xcheck:jni       Esegue controlli aggiuntivi per le funzioni JNI.\n    -Xcomp            Forza la compilazione dei metodi al primo richiamo.\n    -Xdebug           Fornito per la compatibilit\u00E0 con le versioni precedenti.\n    -Xdiag            Mostra ulteriori messaggi diagnostici.\n    -Xdiag:resolver   Mostra i messaggi diagnostici del resolver.\n    -Xfuture          Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n    -Xint             Esecuzione solo in modalit\u00E0 convertita.\n    -Xinternalversion\n                      Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n                      all''opzione -version.\n    -Xloggc:<file>    Registra lo stato GC in un file con indicatori orari.\n    -Xmixed           Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n    -Xmn<size>        Imposta le dimensioni iniziale e massima (in byte) dell''heap\n                      per la young generation (nursery).\n    -Xms<size>        Imposta la dimensione heap Java iniziale.\n    -Xmx<size>        Imposta la dimensione heap Java massima.\n    -Xnoclassgc       Disabilta la garbage collection della classe.\n    -Xprof            Visualizza i dati di profilo della CPU.\n    -Xrs              Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n    -Xshare:auto      Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n     -Xshare:off       Non tenta di utilizzare i dati di classe condivisi.\n    -Xshare:on        Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n    -XshowSettings    Mostra tutte le impostazioni e continua.\n    -XshowSettings:all\n                      Mostra tutte le impostazioni e continua.\n    -XshowSettings:locale\n                      Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n    -XshowSettings:properties\n                      Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n    -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n    -Xss<size>        Imposta la dimensione dello stack di thread Java.\n     -Xverify          Imposta la modalit\u00E0 del verificatore bytecode.\n    --add-reads:<module>=<target-module>(,<target-module>)*\n                      Aggiorna <module> per leggere <target-module>, indipendentemente\n                      dalla dichiarazione del modulo.\n                      <target-module> pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n                      moduli senza nome.\n   -add-exports:<module>/<package>=<target-module>(,<target-module>)*\n                      Aggiorna <module> per esportare <package> in <target-module>,\n                      indipendentemente dalla dichiarazione del modulo.\n                      <target-module> pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n                      moduli senza nome.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      Aggiorna <module> per aprire <package> in\n                      <target-module>, indipendentemente dalla dichiarazione del modulo.\n    --disable-@files  Disabilita l''ulteriore espansione del file di argomenti.\n    -patch-module <module>=<file>({0}<file>)*\n                      Sostituisce o migliora un modulo con classi e risorse\n                      in file JAR o directory.\n\nQueste opzioni non sono opzioni standard e sono soggette a modifiche senza preavviso.\n
+java.launcher.X.usage=\n    -Xbatch           Disabilita la compilazione in background.\n    -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n                      Aggiunge alla fine del classpath di bootstrap.\n   -Xcheck:jni       Esegue controlli aggiuntivi per le funzioni JNI.\n    -Xcomp            Forza la compilazione dei metodi al primo richiamo.\n    -Xdebug           Fornito per la compatibilit\u00E0 con le versioni precedenti.\n    -Xdiag            Mostra ulteriori messaggi diagnostici.\n    -Xfuture          Abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future.\n    -Xint             Esecuzione solo in modalit\u00E0 convertita.\n    -Xinternalversion\n                      Visualizza informazioni pi\u00F9 dettagliate sulla versione JVM rispetto\n                      all''opzione -version.\n    -Xloggc:<file>    Registra lo stato GC in un file con indicatori orari.\n    -Xmixed           Esecuzione in modalit\u00E0 mista (impostazione predefinita).\n    -Xmn<dimensione>        Imposta le dimensioni iniziale e massima (in byte) dell''heap\n                      per la young generation (nursery).\n    -Xms<dimensione>        Imposta la dimensione heap Java iniziale.\n    -Xmx<dimensione>        Imposta la dimensione heap Java massima.\n    -Xnoclassgc       Disabilta la garbage collection della classe.\n    -Xprof            Visualizza i dati di profilo della CPU (non pi\u00F9 valida).\n    -Xrs              Riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione).\n    -Xshare:auto      Utilizza i dati di classe condivisi se possibile (impostazione predefinita).\n     -Xshare:off       Non tenta di utilizzare i dati di classe condivisi.\n    -Xshare:on        Richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n    -XshowSettings    Mostra tutte le impostazioni e continua.\n    -XshowSettings:all\n                      Mostra tutte le impostazioni e continua.\n    -XshowSettings:locale\n                      Mostra tutte le impostazioni correlate alle impostazioni nazionali e continua.\n    -XshowSettings:properties\n                      Mostra tutte le impostazioni delle propriet\u00E0 e continua.\n    -XshowSettings:vm Mostra tutte le impostazioni correlate alla VM e continua.\n    -Xss<dimensione>        Imposta la dimensione dello stack di thread Java.\n     -Xverify          Imposta la modalit\u00E0 del verificatore bytecode.\n    --add-reads:<modulo>=<modulo destinazione>(,<modulo destinazione>)*\n                      Aggiorna <modulo> per leggere <modulo destinazione>, indipendentemente\n                      dalla dichiarazione del modulo.\n                      <modulo destinazione> pu\u00F2 essere ALL-UNNAMED per leggere tutti i\n                      moduli senza nome.\n   -add-exports:<modulo>/<package>=<modulo destinazione>(,<modulo destinazione>)*\n                      Aggiorna <modulo> per esportare <package> in <modulo destinazione>,\n                      indipendentemente dalla dichiarazione del modulo.\n                      <modulo destinazione> pu\u00F2 essere ALL-UNNAMED per esportare tutti i\n                      moduli senza nome.\n    --add-opens <modulo>/<package>=<modulo destinazione>(,<modulo destinazione>)*\n                      Aggiorna <modulo> per aprire <package> in\n                      <modulo destinazione>, indipendentemente dalla dichiarazione del modulo.\n    --permit-illegal-access\n                      Permette l''accesso non consentito ai membri dei tipi nei moduli denominati\n                      mediante codice in moduli senza nome. Questa opzione di compatibilit\u00E0 verr\u00E0\n                      rimossa nella release successiva.\n    --limit-modules <nome modulo>[,<nome modulo>...]\n                      Limita l''universo di moduli osservabili\n    -patch-module <modulo>=<file>({0}<file>)*\n                      Sostituisce o migliora un modulo con \
+classi e risorse\n                      in file JAR o directory.\n    --disable-@files  Disabilita l''ulteriore espansione di file argomenti.\n\nQueste opzioni non standard sono soggette a modifiche senza preavviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n    -XstartOnFirstThread\n                      Esegue il metodo main() sul primo thread (AppKit).\n    -Xdock:name=<nome applicazione>\n                      Sostituisce il nome applicazione predefinito visualizzato nel dock\n    -Xdock:icon=<percorso file icona>\n                      Sostituisce l'icona predefinita visualizzata nel dock\n\n
 
-java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0}
+java.launcher.cls.error1=Errore: impossibile trovare o caricare la classe principale {0}\nCausato da: {1}: {2}
 java.launcher.cls.error2=Errore: il metodo principale non \u00E8 {0} nella classe {1}. Definire il metodo principale come:\n   public static void main(String[] args)
 java.launcher.cls.error3=Errore: il metodo principale deve restituire un valore di tipo void nella classe {0}. \nDefinire il metodo principale come:\n   public static void main(String[] args)
 java.launcher.cls.error4=Errore: il metodo principale non \u00E8 stato trovato nella classe {0}. Definire il metodo principale come:\n   public static void main(String[] args)\naltrimenti una classe applicazione JavaFX deve estendere {1}
 java.launcher.cls.error5=Errore: non sono presenti i componenti runtime di JavaFX necessari per eseguire questa applicazione
+java.launcher.cls.error6=Errore: LinkageError durante il caricamento della classe principale {0}\n\t{1}
 java.launcher.jar.error1=Errore: si \u00E8 verificato un errore imprevisto durante il tentativo di aprire il file {0}
 java.launcher.jar.error2=manifest non trovato in {0}
 java.launcher.jar.error3=nessun attributo manifest principale in {0}
+java.launcher.jar.error4=errore durante il caricamento dell''agente java in {0}
 java.launcher.init.error=errore di inizializzazione
 java.launcher.javafx.error1=Errore: il metodo JavaFX launchApplication dispone di una firma errata, \nla firma deve essere dichiarata static e restituire un valore di tipo void
 java.launcher.module.error1=il modulo {0} non dispone di un attributo MainClass. Utilizzare -m <module>/<mail-class>
 java.launcher.module.error2=Errore: impossibile trovare o caricare la classe principale {0} nel modulo {1}
+java.launcher.module.error3=Errore: impossibile caricare la classe principale {0} dal modulo {1}\n\t{2}
+java.launcher.module.error4={0} non trovato
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,33 +24,37 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n           (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -jar jarfile [args...]\n           (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n
+java.launcher.opt.header  =   \u4F7F\u7528\u65B9\u6CD5: {0} [options] <mainclass> [args...]\n           (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -jar <jarfile> [args...]\n           (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\n \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9-jar <jarfile>\u3001-m\u307E\u305F\u306F--module\n <module>/<mainclass>\u306B\u7D9A\u304F\u5F15\u6570\u306F\u3001\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3078\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3055\u308C\u307E\u3059\u3002\n\n \u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059\n
 java.launcher.opt.vmselect   =\    {0}\t  "{1}" VM\u3092\u9078\u629E\u3059\u308B\u5834\u5408\n
 java.launcher.opt.hotspot    =\    {0}\t  \u306F"{1}" VM\u306E\u30B7\u30CE\u30CB\u30E0\u3067\u3059  [\u975E\u63A8\u5968]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n                  \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\n                  \u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n    -p <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>\n    --module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n    --upgrade-module-path <\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n                  \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                  \u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n    -m <module>[/<mainclass>]\n    --module <modulename>[/<mainclass>]\n                  \u89E3\u6C7A\u3059\u308B\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\n                  \u5B9F\u884C\u3059\u308B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u540D\u524D\n    --add-modules <modulename>[,<modulename>...]\n                  \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n                  <modulename>\u306B\u306F\u3001ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH\u3082\u4F7F\u7528\u3067\u304D\u308B\u3002\n    --limit-modules <modulename>[,<modulename>...]\n                  \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3059\u308B\n    --list-modules [<modulename>[,<modulename>...]]\n                  \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u4E00\u89A7\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n    --dry-run     VM\u3092\u4F5C\u6210\u3059\u308B\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u306A\u3044\u3002\n                  \u3053\u306E--dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\n                  \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u691C\u8A3C\u3059\u308B\u5834\u5408\u306B\u4FBF\u5229\u3067\u3059\u3002\n    -D<name>=<value>\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n    -verbose:[class|gc|jni]\n                  \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n    -version      \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n    --version     \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n    \
--showversion  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n    --show-version\n                  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -? -h -help\n                  \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n    --help        \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n    -X            \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n    --help-extra  \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3059\u308B\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -esa | -enablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -dsa | -disablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -agentlib:<libname>[=<options>]\n                  \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:jdwp\n                  -agentlib:jdwp=help\u3082\u53C2\u7167\n    -agentpath:<pathname>[=<options>]\n                  \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n    -javaagent:<jarpath>[=<options>]\n                  Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n    -splash:<imagepath>\n                  \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n                  HiDPI\u306B\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3001\n                  \u4F7F\u7528\u3067\u304D\u308C\u3070\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u5FC5\u305A\u3001\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\n                  \u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D\u3001\u305F\u3068\u3048\u3070image.ext\u3092\u3001\n                  \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n                  \u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\n                  \u9078\u629E\u3055\u308C\u307E\u3059\u3002\n                  \u8A73\u7D30\u306FSplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n    @<filepath>   \
-\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n\nlong\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u306B\u306F\u3001--<name>=<value>\u307E\u305F\u306F--<name> <value>\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n
+java.launcher.opt.footer = \    -cp <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    -classpath <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n    --class-path <\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB\u306E\u30AF\u30E9\u30B9\u691C\u7D22\u30D1\u30B9>\n                  {0}\u533A\u5207\u308A\u30EA\u30B9\u30C8(\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u3001\n                  ZIP\u30A2\u30FC\u30AB\u30A4\u30D6)\u3067\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u691C\u7D22\u7528\u3002\n    -p <module path>\n    --module-path <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                  \u306F\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n    --upgrade-module-path <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3001\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                  \u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u5185\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n    --add-modules <module name>[,<module name>...]\n                  \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3002\n                  <module name>\u306B\u306F\u6B21\u3082\u6307\u5B9A\u3067\u304D\u307E\u3059: ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --d <module name>\n    --describe-module <module name>\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAC\u660E\u3057\u7D42\u4E86\u3057\u307E\u3059\n    --dry-run     VM\u3092\u4F5C\u6210\u3057\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u304C\u3001\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u884C\u3057\u307E\u305B\u3093\u3002\n                  --dry-run\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u8A3C\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30B7\u30B9\u30C6\u30E0\u69CB\u6210\u306A\u3069\u306E\u30B3\u30DE\u30F3\u30C9\u884C\u30AA\u30D7\u30B7\u30E7\u30F3\u3002\n    --validate-modules\n                  \u3059\u3079\u3066\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u691C\u8A3C\u3057\u7D42\u4E86\u3057\u307E\u3059\n                  --validate-modules\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u691C\u7D22\u306B\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059:\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u4E0A\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306E\u7AF6\u5408\u304A\u3088\u3073\u305D\u306E\u4ED6\u306E\u30A8\u30E9\u30FC\u3002\n    -D<name>=<value>\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3057\u307E\u3059\n    -verbose:[class|module|gc|jni]\n                  \u8A73\u7D30\u51FA\u529B\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -version      \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n    --version     \
+\u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3057\u307E\u3059\n    -showversion  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n    --show-version\n                  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3057\u307E\u3059\n    --show-module-resolution\n                  \u8D77\u52D5\u6642\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u89E3\u6C7A\u51FA\u529B\u3092\u8868\u793A\u3057\u307E\u3059\n    -? -h -help\n                  \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    --help        \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    -X            \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u30A8\u30E9\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    --help-extra  \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u51FA\u529B\u3057\u307E\u3059\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n    -esa | -enablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n    -dsa | -disablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n    -agentlib:<libname>[=<options>]\n                  \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002\u4F8B: -agentlib:jdwp\n                  -agentlib:jdwp=help\u3082\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n    -agentpath:<pathname>[=<options>]\n                  \u30D5\u30EB\u30D1\u30B9\u540D\u3092\u4F7F\u7528\u3057\u3066\u3001\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\n    -javaagent:<jarpath>[=<options>]\n                  Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3057\u307E\u3059\u3002java.lang.instrument\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n    -splash:<imagepath>\n                  \u6307\u5B9A\u3055\u308C\u305F\u30A4\u30E1\u30FC\u30B8\u3092\u542B\u3080\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3057\u307E\u3059\n                  HiDPI\u30B9\u30B1\u30FC\u30EB\u306E\u30A4\u30E1\u30FC\u30B8\u304C\u81EA\u52D5\u7684\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n                  (\u53EF\u80FD\u306A\u5834\u5408)\u3002\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u3055\u308C\u306A\u3044\u30A4\u30E1\u30FC\u30B8\u306E\u30D5\u30A1\u30A4\u30EB\u540D(image.ext\u306A\u3069)\u3092\n                  \u5F15\u6570\u3068\u3057\u3066-splash\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5FC5\u305A\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n                  \
+\u6307\u5B9A\u3055\u308C\u305F\u6700\u3082\u9069\u5207\u306A\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u6E08\u30A4\u30E1\u30FC\u30B8\u304C\u9078\u629E\u3055\u308C\u307E\u3059\n                  (\u81EA\u52D5\u7684)\u3002\n                  \u8A73\u7D30\u306F\u3001SplashScreen API\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\n    @argument\u30D5\u30A1\u30A4\u30EB\n                  \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u542B\u30801\u3064\u4EE5\u4E0A\u306E\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\n    -disable-@files\n                  \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\u9577\u3044\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3059\u308B\u5834\u5408\u3001--<name>=<value>\u307E\u305F\u306F\n--<name> <value>\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n                      \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n    -Xcheck:jni       JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n    -Xcomp            \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n    -Xdebug           \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n    -Xdiag            \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xdiag:resolver   \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xfuture          \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xint             \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n    -Xinternalversion\n                      -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n                       \u8868\u793A\u3059\u308B\n    -Xloggc:<file>    \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n    -Xmixed           \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xmn<size>        \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n                      \u3092\u8A2D\u5B9A\u3059\u308B\n    -Xms<size>        Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xmx<size>        Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xnoclassgc       \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xprof            CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n    -Xrs              Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n    -Xshare:auto      \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xshare:off       \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n    -Xshare:on        \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n    -XshowSettings    \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:all\n                      \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:locale\n                      \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:properties\n                      \
-\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -Xss<size>        Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xverify          \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<target-module>\n                      \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092<target-module>\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066\n                      <package>\u3092<target-module>\u306B\u958B\u304D\u307E\u3059\u3002\n    --disable-@files  \u3055\u3089\u306A\u308B\u5F15\u6570\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n    --patch-module <module>=<file>({0}<file>)*\n                      JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\u3002\n\n\u3053\u308C\u3089\u306F\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002\n
+java.launcher.X.usage=\n    -Xbatch           \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n                      \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n    -Xcheck:jni       JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n    -Xcomp            \u521D\u56DE\u547C\u51FA\u3057\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5F37\u5236\u3059\u308B\n    -Xdebug           \u4E0B\u4F4D\u4E92\u63DB\u6027\u306E\u305F\u3081\u306B\u63D0\u4F9B\n    -Xdiag            \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xfuture          \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xint             \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n    -Xinternalversion\n                      -version\u30AA\u30D7\u30B7\u30E7\u30F3\u3088\u308A\u8A73\u7D30\u306AJVM\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\n                       \u8868\u793A\u3059\u308B\n    -Xloggc:<file>    \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n    -Xmixed           \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xmn<size>        \u82E5\u3044\u4E16\u4EE3(\u30CA\u30FC\u30B5\u30EA)\u306E\u30D2\u30FC\u30D7\u306E\u521D\u671F\u304A\u3088\u3073\u6700\u5927\u30B5\u30A4\u30BA(\u30D0\u30A4\u30C8\u5358\u4F4D)\n                      \u3092\u8A2D\u5B9A\u3059\u308B\n    -Xms<size>        Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xmx<size>        Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xnoclassgc       \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xprof            CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n    -Xrs              Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n    -Xshare:auto      \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xshare:off       \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n    -Xshare:on        \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n    -XshowSettings    \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:all\n                      \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:locale\n                      \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:properties\n                      \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    \
+-Xss<size>        Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xverify          \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u691C\u8A3C\u6A5F\u80FD\u306E\u30E2\u30FC\u30C9\u3092\u8A2D\u5B9A\u3059\u308B\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<target-module>\n                      \u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 \n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u8AAD\u307F\u53D6\u308C\u307E\u3059\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066<package>\u3092<target-module>\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002\n                      <target-module>\u3092ALL-UNNAMED\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u3059\u3079\u3066\u306E\u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\n                      \u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3067\u304D\u307E\u3059\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001<module>\u3092\u66F4\u65B0\u3057\u3066\n                      <package>\u3092<target-module>\u306B\u958B\u304D\u307E\u3059\u3002\n    --permit-illegal-access\n                      \u540D\u524D\u306E\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30B3\u30FC\u30C9\u306B\u3088\u308B\u3001\u540D\u524D\u306E\u3042\u308B\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5185\u306E\u30BF\u30A4\u30D7\u306E\u30E1\u30F3\u30D0\u30FC\u3078\u306E\u4E0D\u6B63\u30A2\u30AF\u30BB\u30B9\u3092\n                      \u8A31\u53EF\u3057\u307E\u3059\u3002\u3053\u306E\u4E92\u63DB\u6027\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u3001\u6B21\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u307E\u3059\u3002\n    --limit-modules <module name>[,<module name>...]\n                      \u53C2\u7167\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u9818\u57DF\u3092\u5236\u9650\u3057\u307E\u3059\n    --patch-module <module>=<file>({0}<file>)*\n                      JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3057\u307E\u3059\n    --disable-@files  \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\n\n\u3053\u308C\u3089\u306E\u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u4E88\u544A\u306A\u304F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059:\n    -XstartOnFirstThread\n                      main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n    -Xdock:name=<application name>\n                      Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n    -Xdock:icon=<path to icon file>\n                      Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n
 
-java.launcher.cls.error1=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
+java.launcher.cls.error1=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u3092\u691C\u51FA\u304A\u3088\u3073\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\n\u539F\u56E0: {1}: {2}
 java.launcher.cls.error2=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{1}\u306E{0}\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n   public static void main(String[] args)
 java.launcher.cls.error3=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u306F\u30AF\u30E9\u30B9{0}\u306Evoid\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n   public static void main(String[] args)
 java.launcher.cls.error4=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u30AF\u30E9\u30B9{0}\u3067\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u30E1\u30A4\u30F3\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u5B9A\u7FA9\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n   public static void main(String[] args)\n\u307E\u305F\u306FJavaFX\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30AF\u30E9\u30B9\u306F{1}\u3092\u62E1\u5F35\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 java.launcher.cls.error5=\u30A8\u30E9\u30FC: JavaFX\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u4E0D\u8DB3\u3057\u3066\u304A\u308A\u3001\u3053\u306E\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\u5B9F\u884C\u306B\u5FC5\u8981\u3067\u3059
+java.launcher.cls.error6=\u30A8\u30E9\u30FC: \u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u4E2D\u306BLinkageError\u304C\u767A\u751F\u3057\u307E\u3057\u305F\n\t{1}
 java.launcher.jar.error1=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB{0}\u3092\u958B\u3053\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u3001\u4E88\u671F\u3057\u306A\u3044\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
 java.launcher.jar.error2={0}\u306B\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 java.launcher.jar.error3={0}\u306B\u30E1\u30A4\u30F3\u30FB\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093
+java.launcher.jar.error4={0}\u5185\u306EJava\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u30ED\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
 java.launcher.init.error=\u521D\u671F\u5316\u30A8\u30E9\u30FC
 java.launcher.javafx.error1=\u30A8\u30E9\u30FC: JavaFX launchApplication\u30E1\u30BD\u30C3\u30C9\u306B\u8AA4\u3063\u305F\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u3042\u308A\u3001\nstatic\u3092\u5BA3\u8A00\u3057\u3066void\u578B\u306E\u5024\u3092\u8FD4\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 java.launcher.module.error1=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306BMainClass\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002-m <module>/<main-class>\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044
 java.launcher.module.error2=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u306B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u3089\u306A\u304B\u3063\u305F\u304B\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
+java.launcher.module.error3=\u30A8\u30E9\u30FC: \u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304B\u3089\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9{0}\u306E\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F\n\t{2}
+java.launcher.module.error4={0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,32 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n           (\uD074\uB798\uC2A4 \uC2E4\uD589)\n   \uB610\uB294  {0} [options] -jar jarfile [args...]\n           (jar \uD30C\uC77C \uC2E4\uD589)\n   \uB610\uB294  {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n\n
+java.launcher.opt.header  =   \uC0AC\uC6A9\uBC95: {0} [\uC635\uC158] <\uAE30\uBCF8 \uD074\uB798\uC2A4> [args...]\n           (\uD074\uB798\uC2A4 \uC2E4\uD589)\n   \uB610\uB294  {0} [\uC635\uC158] -jar <jar \uD30C\uC77C> [args...]\n           (jar \uD30C\uC77C \uC2E4\uD589)\n   \uB610\uB294  {0} [\uC635\uC158] -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n       {0} [\uC635\uC158] --module <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>] [args...]\n           (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\n \uAE30\uBCF8 \uD074\uB798\uC2A4, -jar <jar \uD30C\uC77C>, -m \uB610\uB294 --module\n <\uBAA8\uB4C8>/<\uAE30\uBCF8 \uD074\uB798\uC2A4> \uB4A4\uC5D0 \uB098\uC624\uB294 \uC778\uC218\uB294 \uAE30\uBCF8 \uD074\uB798\uC2A4\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB429\uB2C8\uB2E4.\n\n \uC774 \uACBD\uC6B0 \uC635\uC158\uC5D0\uB294 \uB2E4\uC74C\uC774 \uD3EC\uD568\uB429\uB2C8\uB2E4.\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C. \uC774\uD6C4 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n
 java.launcher.opt.vmselect   =\    {0}\t  "{1}" VM\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.\n
 java.launcher.opt.hotspot    =\    {0}\t  "{1}" VM\uC758 \uB3D9\uC758\uC5B4\uC785\uB2C8\uB2E4[\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C].\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n              \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n                  JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n    -p <\uBAA8\uB4C8 \uACBD\uB85C>\n    -module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    -upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uB85C, \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC\n                  \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD569\uB2C8\uB2E4.\n    -m <\uBAA8\uB4C8>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n    --module <\uBAA8\uB4C8 \uC774\uB984>[/<\uAE30\uBCF8 \uD074\uB798\uC2A4>]\n              \uBD84\uC11D\uD560 \uCD08\uAE30 \uBAA8\uB4C8 \uBC0F \uBAA8\uB4C8\uC5D0\uC11C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uC2E4\uD589\uD560\n                  \uAE30\uBCF8 \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC785\uB2C8\uB2E4.\n    --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                  \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n                  <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH\uC77C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.\n    --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n    --list-modules[<\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]]\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --dry-run     VM\uC744 \uC0DD\uC131\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n                  \uC774 --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740 \uBA85\uB839\uD589\n                  \uC635\uC158\uC744 \uAC80\uC99D\uD558\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    -D<\uC774\uB984>=<\uAC12>\n                  \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n    -verbose:[class|gc|jni]\n                  \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -version      \uC81C\uD488 \uBC84\uC804\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --version     \uC81C\uD488 \uBC84\uC804\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -showversion  \uC81C\uD488 \uBC84\uC804\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-version\n                  \uC81C\uD488 \uBC84\uC804\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -? -h -help\n                 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC624\uB958 \
-\uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    --help        \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -X            \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    --help-extra  \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n    -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n    -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -esa | -enablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -dsa | -disablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n                  \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n                  -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n                  \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n    -javaagent:<jar \uACBD\uB85C>[=<\uC635\uC158>]\n                  Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n                  \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n                  HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n                  \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n                  \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n                  \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n                  \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n                  \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    @<\uD30C\uC77C \uACBD\uB85C>   \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
+java.launcher.opt.footer = \    -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    --class-path <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n                  \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD558\uAE30 \uC704\uD55C \uB514\uB809\uD1A0\uB9AC, JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C\uC758 {0}(\uC73C)\uB85C\n                  \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n    -p <\uBAA8\uB4C8 \uACBD\uB85C>\n    --module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    --upgrade-module-path <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  \uB514\uB809\uD1A0\uB9AC\uC758 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD558\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    --add-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                  \uCD08\uAE30 \uBAA8\uB4C8 \uC774\uC678\uC758 \uD574\uACB0\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n                  <\uBAA8\uB4C8 \uC774\uB984>\uC740 ALL-DEFAULT, ALL-SYSTEM\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --d <\uBAA8\uB4C8 \uC774\uB984>\n    --describe-module <\uBAA8\uB4C8 \uC774\uB984>\n                  \uBAA8\uB4C8\uC744 \uC124\uBA85\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --dry-run     VM\uC744 \uC0DD\uC131\uD558\uACE0 \uAE30\uBCF8 \uD074\uB798\uC2A4\uB97C \uB85C\uB4DC\uD558\uC9C0\uB9CC \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD558\uC9C0\uB294 \uC54A\uC2B5\uB2C8\uB2E4.\n                  --dry-run \uC635\uC158\uC740 \uBAA8\uB4C8 \uC2DC\uC2A4\uD15C \uAD6C\uC131\uACFC \uAC19\uC740\n                  \uBA85\uB839\uC904 \uC635\uC158 \uAC80\uC99D\uC5D0 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --validate-modules\n                  \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uAC80\uC99D\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n                  --validate-modules \uC635\uC158\uC740 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C \uBAA8\uB4C8\uC5D0 \uB300\uD55C\n                  \uCDA9\uB3CC \uBC0F \uAE30\uD0C0 \uC624\uB958\uB97C \uCC3E\uB294 \uB370 \uC720\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    -D<\uC774\uB984>=<\uAC12>\n                  \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n    -verbose:[class|module|gc|jni]\n                  \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\n    -version      \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    --version     \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -showversion  \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-version\n                  \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    --show-module-resolution\n                  \uC2DC\uC791 \uC911 \uBAA8\uB4C8 \uBD84\uC11D \uCD9C\uB825\uC744 \
+\uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -? -h -help\n                  \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    --help        \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -X            \uC624\uB958 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    --help-extra  \uCD9C\uB825 \uC2A4\uD2B8\uB9BC\uC5D0 \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -ea[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n    -enableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -da[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n    -disableassertions[:<\uD328\uD0A4\uC9C0 \uC774\uB984>...|:<\uD074\uB798\uC2A4 \uC774\uB984>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -esa | -enablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -dsa | -disablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -agentlib:<\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>[=<\uC635\uC158>]\n                  \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <\uB77C\uC774\uBE0C\uB7EC\uB9AC \uC774\uB984>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n                  -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -agentpath:<\uACBD\uB85C \uC774\uB984>[=<\uC635\uC158>]\n                  \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n    -javaagent:<jar \uACBD\uB85C>[=<\uC635\uC158>]\n                  Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -splash:<\uC774\uBBF8\uC9C0 \uACBD\uB85C>\n                  \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n                  HiDPI\uB85C \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C \uC9C0\uC6D0\uB418\uACE0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uACBD\uC6B0\n                  \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uBBF8\uC870\uC815 \uC774\uBBF8\uC9C0 \uD30C\uC77C \uC774\uB984(\uC608: image.ext)\uC740\n                  \uD56D\uC0C1 -splash \uC635\uC158\uC5D0 \uC778\uC218\uB85C \uC804\uB2EC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.\n                  \uAC00\uC7A5 \uC801\uC808\uD788 \uC870\uC815\uB41C \uC774\uBBF8\uC9C0\uAC00 \uC790\uB3D9\uC73C\uB85C\n                  \uCC44\uD0DD\uB429\uB2C8\uB2E4.\n                  \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 SplashScreen API \uC124\uBA85\uC11C\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    @\uC778\uC218 \uD30C\uC77C\n                  -disable-@files \uC635\uC158\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294 \uD558\uB098 \uC774\uC0C1\uC758\n    \uC778\uC218 \uD30C\uC77C\n                  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uBC29\uC9C0\uD569\uB2C8\uB2E4.\nlong \uC635\uC158\uC5D0 \uB300\uD55C \uC778\uC218\uB97C \uC9C0\uC815\uD558\uB824\uBA74 --<\uC774\uB984>=<\uAC12> \uB610\uB294\n--<\uC774\uB984> <\uAC12>\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n                      \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n    -Xcheck:jni       JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n    -Xcomp            \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n    -Xdebug           \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n    -Xdiag            \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xdiag:resolver   \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xfuture          \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xint             \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xinternalversion\n                      -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xloggc:<file>    \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n    -Xmixed           \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xmn<size>        \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n                      \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xms<size>        \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xmx<size>        \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xnoclassgc       \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xprof            CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n    -Xrs              Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n    -Xshare:auto      \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xshare:off       \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n    -Xshare:on        \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n    -XshowSettings    \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:all\n                      \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:locale\n                      \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:properties\n                      \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -Xss<size>        Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \
-\uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xverify          \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <target-module>\uC744 \uC77D\uB3C4\uB85D\n                      <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <target-module>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <package>\uB97C <target-module>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n                      <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <target-module>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <package>\uB97C <target-module>\uB85C \uC5F4\uB3C4\uB85D\n                      <module>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n    --disable-@files  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    --patch-module <module>=<file>({0}<file>)*\n                      JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n                      \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
+java.launcher.X.usage=\n    -Xbatch           \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n                      \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n    -Xcheck:jni       JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n    -Xcomp            \uCCAB\uBC88\uC9F8 \uD638\uCD9C\uC5D0\uC11C \uBA54\uC18C\uB4DC \uCEF4\uD30C\uC77C\uC744 \uAC15\uC81C\uD569\uB2C8\uB2E4.\n    -Xdebug           \uC5ED \uD638\uD658\uC131\uC744 \uC704\uD574 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.\n    -Xdiag            \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xfuture          \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xint             \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xinternalversion\n                      -version \uC635\uC158\uBCF4\uB2E4 \uC0C1\uC138\uD55C JVM \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xloggc:<\uD30C\uC77C>    \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n    -Xmixed           \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xmn<\uD06C\uAE30>        \uC80A\uC740 \uC138\uB300(Nursery)\uB97C \uC704\uD574 \uD799\uC758 \uCD08\uAE30 \uBC0F \uCD5C\uB300\n                      \uD06C\uAE30(\uBC14\uC774\uD2B8)\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xms<\uD06C\uAE30>        \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xmx<\uD06C\uAE30>        \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xnoclassgc       \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xprof            CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4(\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C).\n    -Xrs              Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n    -Xshare:auto      \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xshare:off       \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n    -Xshare:on        \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n    -XshowSettings    \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:all\n                      \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:locale\n                      \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:properties\n                      \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -Xss<\uD06C\uAE30>        Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xverify          \uBC14\uC774\uD2B8\uCF54\uB4DC \uAC80\uC99D\uC790\uC758 \uBAA8\uB4DC\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n  \
+  --add-reads <\uBAA8\uB4C8>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uB300\uC0C1-\uBAA8\uB4C8>\uC744 \uC77D\uB3C4\uB85D\n                      <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uC744 \uC77D\uC744 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-exports <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD558\uB3C4\uB85D\n                      <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n                      <\uB300\uC0C1-\uBAA8\uB4C8>\uC740 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD560 \uC218 \uC788\uB294\n                      ALL-UNNAMED\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n    --add-opens <\uBAA8\uB4C8>/<\uD328\uD0A4\uC9C0>=<\uB300\uC0C1-\uBAA8\uB4C8>(,<\uB300\uC0C1-\uBAA8\uB4C8>)*\n                      \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774 <\uD328\uD0A4\uC9C0>\uB97C <\uB300\uC0C1-\uBAA8\uB4C8>\uB85C \uC5F4\uB3C4\uB85D\n                      <\uBAA8\uB4C8>\uC744 \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.\n    --permit-illegal-access\n                      \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4C8\uC758 \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC774\uB984\uC774 \uC9C0\uC815\uB41C\n                      \uBAA8\uB4C8\uC758 \uC720\uD615 \uBA64\uBC84\uC5D0 \uB300\uD55C \uC798\uBABB\uB41C \uC561\uC138\uC2A4\uB97C \uD5C8\uC6A9\uD569\uB2C8\uB2E4. \uC774 \uD638\uD658\uC131\n                      \uC635\uC158\uC740 \uB2E4\uC74C \uB9B4\uB9AC\uC2A4\uC5D0\uC11C \uC81C\uAC70\uB429\uB2C8\uB2E4.\n    --limit-modules <\uBAA8\uB4C8 \uC774\uB984>[,<\uBAA8\uB4C8 \uC774\uB984>...]\n                      \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uACF5\uC6A9\uC744 \uC81C\uD55C\uD569\uB2C8\uB2E4.\n    --patch-module <\uBAA8\uB4C8>=<\uD30C\uC77C>({0}<\uD30C\uC77C>)*\n                      JAR \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n                      \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n    --disable-@files  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n\uC774\uB7EC\uD55C \uCD94\uAC00 \uC635\uC158\uC740 \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n    -XstartOnFirstThread\n                      \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xdock:name=<application name>\n                      \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n    -Xdock:icon=<path to icon file>\n                      \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n
 
-java.launcher.cls.error1=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.cls.error1=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC6D0\uC778: {1}: {2}
 java.launcher.cls.error2=\uC624\uB958: {1} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uAC00 {0}\uC774(\uAC00) \uC544\uB2D9\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n   public static void main(String[] args)
 java.launcher.cls.error3=\uC624\uB958: \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB294 {0} \uD074\uB798\uC2A4\uC5D0\uC11C void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4. \n\uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\n   public static void main(String[] args)
 java.launcher.cls.error4=\uC624\uB958: {0} \uD074\uB798\uC2A4\uC5D0\uC11C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uD615\uC2DD\uC73C\uB85C \uAE30\uBCF8 \uBA54\uC18C\uB4DC\uB97C \uC815\uC758\uD558\uC2ED\uC2DC\uC624.\r\n   public static void main(String[] args)\r\n\uB610\uB294 JavaFX \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uD074\uB798\uC2A4\uB294 {1}\uC744(\uB97C) \uD655\uC7A5\uD574\uC57C \uD569\uB2C8\uB2E4.
 java.launcher.cls.error5=\uC624\uB958: \uC774 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC744 \uC2E4\uD589\uD558\uB294 \uB370 \uD544\uC694\uD55C JavaFX \uB7F0\uD0C0\uC784 \uAD6C\uC131 \uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+java.launcher.cls.error6=\uC624\uB958: \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD558\uB294 \uC911 LinkageError\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\n\t{1}
 java.launcher.jar.error1=\uC624\uB958: {0} \uD30C\uC77C\uC744 \uC5F4\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC0C1\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
 java.launcher.jar.error2={0}\uC5D0\uC11C Manifest\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 java.launcher.jar.error3={0}\uC5D0 \uAE30\uBCF8 Manifest \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.jar.error4={0}\uC5D0\uC11C Java \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
 java.launcher.init.error=\uCD08\uAE30\uD654 \uC624\uB958
 java.launcher.javafx.error1=\uC624\uB958: JavaFX launchApplication \uBA54\uC18C\uB4DC\uC5D0 \uC798\uBABB\uB41C \uC11C\uBA85\uC774 \uC788\uC2B5\uB2C8\uB2E4.\\n\uB530\uB77C\uC11C static\uC73C\uB85C \uC120\uC5B8\uD558\uACE0 void \uC720\uD615\uC758 \uAC12\uC744 \uBC18\uD658\uD574\uC57C \uD569\uB2C8\uB2E4.
 java.launcher.module.error1={0} \uBAA8\uB4C8\uC5D0 MainClass \uC18D\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. -m <module>/<main-class>\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624.
 java.launcher.module.error2=\uC624\uB958: {1} \uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uAC70\uB098 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+java.launcher.module.error3=\uC624\uB958: {1} \uBAA8\uB4C8\uC5D0\uC11C \uAE30\uBCF8 \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\t{2}
+java.launcher.module.error4={0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,31 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Uso: {0} [options] class [args...]\n           (para executar uma classe)\n   ou  {0} [options] -jar jarfile [args...]\n           (para executar um arquivo jar)\n   or  {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (para executar a classe principal em um m\u00F3dulo)\nem que as op\u00E7\u00F5es incluem:\n\n
+java.launcher.opt.header  =   Uso: {0} [options] <mainclass> [args...]\n           (para executar uma classe)\n   ou  {0} [options] -jar <jarfile> [args...]\n           (para executar um arquivo jar)\n   ou  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (para executar a classe principal em um m\u00F3dulo)\n\n Os argumentos ap\u00F3s a classe principal, -jar <jarfile>, -m ou --module\n <module>/<mainclass> s\u00E3o especificados como os argumentos para a classe principal.\n\n em que as op\u00E7\u00F5es incluem:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  Obsoleto, ser\u00E1 removido em uma futura release\n
 java.launcher.opt.vmselect   =\    {0}\t  para selecionar a VM "{1}"\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E9 um sin\u00F4nimo da VM "{1}" [obsoleto]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    --class-path <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n                  e arquivos ZIP nos quais procurar arquivos de classe.\n    -p <caminho de m\u00F3dulo>\n    --module-path <caminho de m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um sendo um\n                  diret\u00F3rio de m\u00F3dulos.\n    --upgrade-module-path <caminho de m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n                  atualiz\u00E1veis na imagem de runtime\n    -m <module>[/<mainclass>]\n    --module <modulename>[/<mainclass>]\n                  o m\u00F3dulo inicial a ser resolvido e o nome da classe principal\n                  a ser executada se n\u00E3o especificado pelo m\u00F3dulo\n    --add-modules <modulename>[,<modulename>...]\n                  m\u00F3dulos raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n                  <modulename> pode ser tamb\u00E9m ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --limit-modules <modulename>[,<modulename>...]\n                  limitar o universo dos m\u00F3dulos observ\u00E1veis\n    --list-modules [<modulename>[,<modulename>...]]\n                  listar os m\u00F3dulos observ\u00E1veis e sair\n    --dry-run     criar VM, mas n\u00E3o executar o m\u00E9todo principal.\n                  Esta op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n                  op\u00E7\u00F5es de linha de comando, como a configura\u00E7\u00E3o do sistema de m\u00F3dulos.\n    -D<name>=<value>\n                  definir uma propriedade do sistema\n    -verbose:[class|gc|jni]\n                  ativar sa\u00EDda detalhada\n    -version      imprimir vers\u00E3o do produto no fluxo de erros e sair\n    --version     imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e sair\n    -showversion  imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e continuar\n    --show-version\n                  imprimir vers\u00E3o do produto no fluxo de sa\u00EDda e continuar\n    -? -h -help\n                  imprimir esta mensagem de ajuda no fluxo de erros\n    --help        imprimir esta mensagem de ajuda no fluxo de sa\u00EDda\n    -X            imprimir ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n    --help-extra  imprimir ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  ativar asser\u00E7\u00F5es com granularidade especificada\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  desativar asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativar asser\u00E7\u00F5es de sistema\n    -dsa | -disablesystemassertions\n                  desativar asser\u00E7\u00F5es de sistema\n    -agentlib:<libname>[=<options>]\n                  carregar biblioteca de agente nativo <libname>; por exemplo, -agentlib:jdwp\n                  ver tamb\u00E9m -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  carregar biblioteca de agente nativo por nome do caminho completo\n    -javaagent:<jarpath>[=<options>]\n                  carregar agente de linguagem de programa\u00E7\u00E3o Java; ver java.lang.instrument\n    -splash:<imagepath>\n                  mostrar tela de apresenta\u00E7\u00E3o com imagem especificada\n                  Imagens em escala HiDPI ser\u00E3o automaticamente suportadas e usadas\n                  se dispon\u00EDveis. O \
-nome do arquivo de imagem sem escala, por exemplo, image.ext,\n                  sempre dever\u00E1 ser informado como argumento para a op\u00E7\u00E3o -splash.\n                  A imagem em escala mais apropriada fornecida ser\u00E1 selecionada\n                  automaticamente.\n                  Consulte a documenta\u00E7\u00E3o da API SplashScreen para obter mais informa\u00E7\u00F5es.\n    @<filepath>   op\u00E7\u00F5es de leitura do arquivo especificado\n\nPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --<name>=<value> ou\n--<name> <value>.\n
+java.launcher.opt.footer = \    -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    --class-path <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n                  e arquivos compactados ZIP para procurar arquivos de classe.\n    -p <caminho do m\u00F3dulo>\n    --module-path <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos.\n    --upgrade-module-path <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n                  pass\u00EDveis de upgrade na imagem de runtime\n    --add-modules <nome do m\u00F3dulo>[,<nome do m\u00F3dulo>...]\n                  m\u00F3dulos-raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial.\n                  <nome do m\u00F3dulo> tamb\u00E9m pode ser ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  lista os m\u00F3dulos observ\u00E1veis e sai\n    --d <nome do m\u00F3dulo>\n    --describe-module <nome do m\u00F3dulo>\n                  descreve um m\u00F3dulo e sai\n    --dry-run     cria VM e carrega classe principal, mas n\u00E3o executa o m\u00E9todo principal.\n                  A op\u00E7\u00E3o --dry-run pode ser \u00FAtil para validar as\n                  op\u00E7\u00F5es de linha de comando como a configura\u00E7\u00E3o do sistema do m\u00F3dulo.\n    --validate-modules\n                  valida todos os m\u00F3dulos e sai\n                  A op\u00E7\u00E3o --validate-modules pode ser \u00FAtil para localizar\n                  conflitos e outros erros com m\u00F3dulos no caminho do m\u00F3dulo.\n    -D<name>=<value>\n                  define uma propriedade de sistema\n    -verbose:[class|module|gc|jni]\n                  ativar sa\u00EDda verbosa\n    -version      imprime a vers\u00E3o do produto no fluxo de erros e sai\n    -version      imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e sai\n    -showversion  imprime a vers\u00E3o do produto no fluxo de erros e continua\n    --show-version\n                  imprime a vers\u00E3o do produto no fluxo de sa\u00EDda e continua\n    --show-module-resolution\n                  mostra a sa\u00EDda da resolu\u00E7\u00E3o do m\u00F3dulo durante a inicializa\u00E7\u00E3o\n    -? -h -help\n                  imprime esta mensagem de ajuda no fluxo de erros\n    --help        imprime esta mensagem de ajuda no fluxo de sa\u00EDda\n    -X            imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de erros\n    --help-extra  imprime ajuda sobre op\u00E7\u00F5es extras no fluxo de sa\u00EDda\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es de sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es de sistema\n    -agentlib:<libname>[=<options>]\n                  carrega biblioteca de agente nativo <libname>, por exemplo, -agentlib:jdwp\n                  consulte tamb\u00E9m -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  carrega biblioteca de agente nativo por nome do caminho completo\n    -javaagent:<jarpath>[=<options>]\n                  carrega agente de linguagem de programa\u00E7\u00E3o Java, consulte java.lang.instrument\n    -splash:<imagepath>\n                  \
+mostra a tela inicial com a imagem especificada\n                  Imagens HiDPI dimensionadas s\u00E3o suportadas automaticamente e utilizadas,\n                  se dispon\u00EDveis. O nome do arquivo de imagem n\u00E3o dimensionada, por exemplo, image.ext,\n                  deve ser informado sempre como argumento para a op\u00E7\u00E3o -splash.\n                  A imagem dimensionada mais apropriada fornecida ser\u00E1 selecionada\n                  automaticamente.\n                  Consulte a documenta\u00E7\u00E3o da API de Tela Inicial para obter mais informa\u00E7\u00F5es\n    @arquivos de argumento\n                  Um ou mais arquivos de argumentos que cont\u00EAm op\u00E7\u00F5es\n    -disable-@files\n                  impede expans\u00E3o adicional de arquivo de argumentos\nnPara especificar um argumento para uma op\u00E7\u00E3o longa, voc\u00EA pode usar --<name>=<value> ou\n--<name> <value>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           desativar compila\u00E7\u00E3o em segundo plano\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexar ao final do caminho de classe de bootstrap\n    -Xcheck:jni       executar verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n    -Xcomp            for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n    -Xdebug           fornecido para compatibilidade reversa\n    -Xdiag            mostrar mensagens adicionais de diagn\u00F3stico\n    -Xdiag:resolver   mostrar mensagens de diagn\u00F3stico do resolvedor\n    -Xfuture          ativar verifica\u00E7\u00F5es mais estritas, antecipando padr\u00E3o futuro\n    -Xint             somente execu\u00E7\u00E3o de modo interpretado\n    -Xinternalversion\n                      exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n                      op\u00E7\u00E3o -version\n    -Xloggc:<file>    registrar status de GC em um arquivo com time-stamps\n    -Xmixed           execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n    -Xmn<size>        define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n                      para a gera\u00E7\u00E3o jovem (infantil)\n    -Xms<size>        definir tamanho inicial do heap Java\n    -Xmx<size>        definir tamanho m\u00E1ximo do heap Java\n    -Xnoclassgc       desativar coleta de lixo de classe\n    -Xprof            gerar dados de perfil de cpu\n    -Xrs              reduzir uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n    -Xshare:auto      usar dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n    -Xshare:off       n\u00E3o tentar usar dados de classe compartilhados\n    -Xshare:on        exigido o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n    -XshowSettings    mostrar todas as defini\u00E7\u00F5es e continuar\n    -XshowSettings:all\n                      mostrar todas as defini\u00E7\u00F5es e continuar\n    -XshowSettings:locale\n                      mostrar todas as defini\u00E7\u00F5es relacionadas a localidade e continuar\n    -XshowSettings:properties\n                      mostrar todas as defini\u00E7\u00F5es de propriedade e continuar\n    -XshowSettings:vm mostrar todas as defini\u00E7\u00F5es relacionadas a vm e continuar\n    -Xss<size>        definir tamanho da pilha de thread java\n    -Xverify          define o modo do verificador de c\u00F3digo de byte\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      atualiza <module> para ler <target-module>, independentemente\n                      da declara\u00E7\u00E3o de m\u00F3dulo. \n                      <target-module> pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n                      sem nome.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para exportar <package> para <target-module>,\n                      independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n                      <target-module> pode ser ALL-UNNAMED para exportar todos os\n                      m\u00F3dulos sem nome.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para abrir <package> para\n                      <target-module>, independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n    --disable-@files  desativar expans\u00E3o de arquivo de argumento adicional\n    --patch-module <module>=<file>({0}<file>)*\n                      Substitui ou amplia um m\u00F3dulo com classes e recursos\n                      em arquivos ou diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n
+java.launcher.X.usage=\n    -Xbatch           desativa compila\u00E7\u00E3o em segundo plano\n    -Xbootclasspath/a:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexa ao final do caminho de classe de bootstrap\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es JNI\n    -Xcomp            for\u00E7a a compila\u00E7\u00E3o de m\u00E9todos na primeira chamada\n    -Xdebug           fornecido para compatibilidade reversa\n    -Xdiag            mostra mensagens adicionais de diagn\u00F3stico\n        -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo, antecipando padr\u00E3o futuro\n    -Xint             somente execu\u00E7\u00E3o de modo interpretado\n    -Xinternalversion\n                      exibe informa\u00E7\u00F5es mais detalhadas da vers\u00E3o da JVM do que a\n                      op\u00E7\u00E3o -version\n    -Xloggc:<file>    registra status de GC em um arquivo com timestamps\n    -Xmixed           execu\u00E7\u00E3o em modo misto (padr\u00E3o)\n    -Xmn<size>        define o tamanho inicial e m\u00E1ximo (em bytes) do heap\n                      para a gera\u00E7\u00E3o jovem (infantil)\n    -Xms<size>        define tamanho inicial do heap Java\n    -Xmx<size>        define tamanho m\u00E1ximo do heap Java\n    -Xnoclassgc       desativa coleta de lixo de classe\n    -Xprof            gera dados de perfil de cpu (obsoleto)\n    -Xrs              reduz uso de sinais do SO por Java/VM (ver documenta\u00E7\u00E3o)\n    -Xshare:auto      usa dados de classe compartilhados se poss\u00EDvel (padr\u00E3o)\n    -Xshare:off       n\u00E3o tenta usar dados de classe compartilhados\n    -Xshare:on        exige o uso de dados de classe compartilhados; caso contr\u00E1rio, falhar\u00E1.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 configura\u00E7\u00E3o regional e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es de propriedade e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas a vm e continua\n    -Xss<size>        define o tamanho da pilha de thread java\n    -Xverify          define o modo do verificador de c\u00F3digo de byte\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      atualiza <module> para ler <target-module>, independentemente\n                      da declara\u00E7\u00E3o de m\u00F3dulo. \n                      <target-module> pode ser ALL-UNNAMED para ler todos os m\u00F3dulos\n                      sem nome.\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para exportar <package> para <target-module>,\n                      independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n                      <target-module> pode ser ALL-UNNAMED para exportar todos os\n                      m\u00F3dulos sem nome.\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      atualiza <module> para abrir <package> para\n                      <target-module>, independentemente da declara\u00E7\u00E3o de m\u00F3dulo.\n    --permit-illegal-access\n                      permite acesso inv\u00E1lido aos membros dos tipos nos m\u00F3dulos com nome\n                     por c\u00F3digo nos m\u00F3dulos sem nomes. Esta op\u00E7\u00E3o de compatibilidade ser\u00E1\n                      removida na pr\u00F3xima release.\n    --limit-modules <module name>[,<module name>...]\n                      limita o universo de m\u00F3dulos observ\u00E1veis\n--patch-module <module>=<file>({0}<file>)*\n                      substitui ou amplia um m\u00F3dulo com classes e recursos\n                      em arquivos ou \
+diret\u00F3rios JAR.\n\nEssas op\u00E7\u00F5es extras est\u00E3o sujeitas a altera\u00E7\u00E3o sem aviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n    -XstartOnFirstThread\n                      executa o m\u00E9todo main() no primeiro thread (AppKit)\n    -Xdock:name=<nome do aplicativo>\n                      substitui o nome do aplicativo padr\u00E3o exibido no encaixe\n    -Xdock:icon=<caminho para o arquivo do \u00EDcone>\n                      substitui o \u00EDcone exibido no encaixe\n\n
 
-java.launcher.cls.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0}
+java.launcher.cls.error1=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0}\nCausada por: {1}: {2}
 java.launcher.cls.error2=Erro: o m\u00E9todo main n\u00E3o \u00E9 {0} na classe {1}; defina o m\u00E9todo main como:\n   public static void main(String[] args)
 java.launcher.cls.error3=Erro: o m\u00E9todo main deve retornar um valor do tipo void na classe {0}; \ndefina o m\u00E9todo main como:\n   public static void main(String[] args)
 java.launcher.cls.error4=Erro: o m\u00E9todo main n\u00E3o foi encontrado na classe {0}; defina o m\u00E9todo main como:\n   public static void main(String[] args)\nou uma classe de aplicativo JavaFX deve expandir {1}
 java.launcher.cls.error5=Erro: os componentes de runtime do JavaFX n\u00E3o foram encontrados. Eles s\u00E3o obrigat\u00F3rios para executar este aplicativo
+java.launcher.cls.error6=Erro: ocorreu LinkageError ao carregar a classe principal {0}\n\t{1}
 java.launcher.jar.error1=Erro: ocorreu um erro inesperado ao tentar abrir o arquivo {0}
 java.launcher.jar.error2=manifesto n\u00E3o encontrado em {0}
 java.launcher.jar.error3=nenhum atributo de manifesto principal em {0}
+java.launcher.jar.error4=erro ao carregar o agente java em {0}
 java.launcher.init.error=erro de inicializa\u00E7\u00E3o
 java.launcher.javafx.error1=Erro: O m\u00E9todo launchApplication do JavaFX tem a assinatura errada. Ele\\ndeve ser declarado como est\u00E1tico e retornar um valor do tipo void
 java.launcher.module.error1=o m\u00F3dulo {0} n\u00E3o tem um atributo MainClass, use -m <module>/<main-class>
 java.launcher.module.error2=Erro: N\u00E3o foi poss\u00EDvel localizar nem carregar a classe principal {0} no m\u00F3dulo {1}
+java.launcher.module.error3=Erro: N\u00E3o \u00E9 poss\u00EDvel carregar a classe principal {0} do m\u00F3dulo {1}\n\t{2}
+java.launcher.module.error4={0} n\u00E3o encontrado.
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,31 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Syntax: {0} [options] class [args...]\n           (f\u00F6r att k\u00F6ra en klass)\n   eller  {0} [options] -jar jarfile [args...]\n           (f\u00F6r att k\u00F6ra en jar-fil)\n   eller {0} [options] -p <moduls\u00F6kv\u00E4g> -m <modulnamn>[/<huvudklass>] [args...]\n           (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n\n
+java.launcher.opt.header  =   Syntax: {0} [options] <huvudklass>[args...]\n           (f\u00F6r att k\u00F6ra en klass)\n   eller  {0} [options] -jar <jar-fil> [args...]\n           (f\u00F6r att k\u00F6ra en jar-fil)\n   eller  {0} [options] -m <modul>[/<huvudklass>] [args...]\n       {0} [options] --module <modul>[/<huvudklass>] [args...]\n           (f\u00F6r att k\u00F6ra huvudklassen i en modul)\n\n Argument som kommer efter huvudklassen, -jar <jar-fil>, -m eller --module\n <modul>/<huvudklass> \u00F6verf\u00F6rs som argument till huvudklassen.\n\n med alternativen:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  Inaktuellt, tas bort i en framtida utg\u00E5va\n
 java.launcher.opt.vmselect   =\    {0}\t  f\u00F6r att v\u00E4lja "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  \u00E4r en synonym f\u00F6r "{1}" VM  [inaktuell]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    --class-path <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n                  En lista \u00F6ver kataloger, JAR-arkiv och ZIP-arkiv att\n                  s\u00F6ka efter klassfiler i, avgr\u00E4nsad med {0}.\n    -p <moduls\u00F6kv\u00E4g>\n    --module-path <moduls\u00F6kv\u00E4g>...\n                  En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n                  med moduler, avgr\u00E4nsad med {0}.\n    --upgrade-module-path <moduls\u00F6kv\u00E4g>...\n                  En lista \u00F6ver kataloger, d\u00E4r varje katalog \u00E4r en katalog\n                  med moduler som ers\u00E4tter uppgraderingsbara moduler\n                  i exekveringsavbilden, avgr\u00E4nsad med {0} \n    -m <modul>[/<huvudklass>]\n    --module <modulnamn>[/<huvudklass>]\n                  den ursprungliga modulen att l\u00F6sa och namnet p\u00E5 huvudklassen\n                  att k\u00F6ra, om den inte anges av modulen\n    --add-modules <modulnamn>[,<modulnamn>...]\n                  rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n                  <modulnamn> kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM och\n                  ALL-MODULE-PATH.\n    --limit-modules <modulnamn>[,<modulnamn>...]\n                  begr\u00E4nsa universumet med observerbara moduler\n    --list-modules [<modulnamn>[,<modulnamn>...]]\n                  lista de observerbara modulerna och avsluta\n    --dry-run     skapa VM:en men k\u00F6r inte huvudmetoden.\n                  Det h\u00E4r alternativet kan vara anv\u00E4ndbart f\u00F6r att validera\n                  kommandoradsalternativen, som modulsystemkonfigurationen.\n    -D<namn>=<v\u00E4rde>\n                  ange en systemegenskap\n    -verbose:[class|gc|jni]\n                  aktivera utf\u00F6rliga utdata\n    -version      skriv ut produktversion till felstr\u00F6mmen och avsluta\n    --version     skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n    -showversion  skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n    --show-version\n                  skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n    -? -h -help\n                  skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n    --help        skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n    -X            skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ till felstr\u00F6mmen\n    --help-extra  skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ till utdatastr\u00F6mmen\n    -ea[:<paketnamn>...|:<klassnamn>]\n    -enableassertions[:<paketnamn>...|:<klassnamn>]\n                  aktivera verifieringar med den angivna detaljgraden\n    -da[:<paketnamn>...|:<klassnamn>]\n    -disableassertions[:<paketnamn>...|:<klassnamn>]\n                  avaktivera verifieringar med den angivna detaljgraden\n    -esa | -enablesystemassertions\n                  aktivera systemverifieringar\n    -dsa | -disablesystemassertions\n                  avaktivera systemverifieringar\n    -agentlib:<biblioteksnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket <biblioteksnamn>, exempel: -agentlib:jdwp\n                  se \u00E4ven -agentlib:jdwp=help\n    -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n    -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n                  ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n    -splash:<bilds\u00F6kv\u00E4g>\n                  visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n                  HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n                  tillg\u00E4ngliga. Filnamnet p\u00E5 den \
-oskal\u00E4ndrade bilden, t.ex.\n                  bild.filtill\u00E4gg, ska alltid \u00F6verf\u00F6ras som argument till\n                  alternativet -splash.\n                  Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs automatiskt.\n                  Mer information finns i dokumentationen f\u00F6r API:t SplashScreen.\n    @<fils\u00F6kv\u00E4g>   l\u00E4s alternativ fr\u00E5n den angivna filen\n\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --<namn>=<v\u00E4rde>\neller --<namn> <v\u00E4rde>.
+java.launcher.opt.footer = \    -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    --class-path <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n                  och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n    -p <moduls\u00F6kv\u00E4g>\n    --module-path <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n                  \u00E4r en katalog \u00F6ver moduler.\n    --upgrade-module-path <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje katalog\n                  \u00E4r en katalog \u00F6ver moduler som ers\u00E4tter uppgraderingsbara\n                  moduler i exekveringsavbilden\n    --add-modules <modulnamn>[,<modulnamn>...]\n                  rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen.\n                  <modulnamn> kan \u00E4ven vara ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  visa observerbara moduler och avsluta\n    --d <modulnamn>\n    --describe-module <modulnamn>\n                  beskriv en modul och avsluta\n    --dry-run     skapa VM och ladda huvudklassen men k\u00F6r inte huvudmetoden.\n                  Alternativet --dry-run kan vara anv\u00E4ndbart f\u00F6r att validera\n                  kommandoradsalternativ, som modulsystemkonfigurationen.\n    --validate-modules\n                  validera alla moduler och avsluta\n                  Alternativet --validate-modules kan vara anv\u00E4ndbart f\u00F6r att hitta\n                  konflikter och andra fel i modulerna p\u00E5 moduls\u00F6kv\u00E4gen.\n    -D<namn>=<v\u00E4rde>\n                  ange en systemegenskap\n    -verbose:[class|module|gc|jni]\n                  aktivera utf\u00F6rliga utdata\n    -version      skriv ut produktversion till felstr\u00F6mmen och avsluta\n    --version     skriv ut produktversion till utdatastr\u00F6mmen och avsluta\n    -showversion  skriv ut produktversion till felstr\u00F6mmen och forts\u00E4tt\n    --show-version\n                  skriv ut produktversion till utdatastr\u00F6mmen och forts\u00E4tt\n    --show-module-resolution\n                  visa modull\u00F6sningsutdata vid start\n    -? -h -help\n                  skriv ut det h\u00E4r hj\u00E4lpmeddelandet till felstr\u00F6mmen\n    --help        skriv ut det h\u00E4r hj\u00E4lpmeddelandet till utdatastr\u00F6mmen\n    -X            skriv ut hj\u00E4lp f\u00F6r extraalternativ till felstr\u00F6mmen\n    --help-extra  skriv ut hj\u00E4lp f\u00F6r extraalternativ till utdatastr\u00F6mmen\n    -ea[:<paketnamn>...|:<klassnamn>]\n    -enableassertions[:<paketnamn>...|:<klassnamn>]\n                  aktivera verifieringar med den angivna detaljgraden\n    -da[:<paketnamn>...|:<klassnamn>]\n    -disableassertions[:<paketnamn>...|:<klassnamn>]\n                  avaktivera verifieringar med den angivna detaljgraden\n    -esa | -enablesystemassertions\n                  aktivera systemverifieringar\n    -dsa | -disablesystemassertions\n                  avaktivera systemverifieringar\n    -agentlib:<biblioteksnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket <biblioteksnamn>, t.ex. -agentlib:jdwp\n                  se \u00E4ven -agentlib:jdwp=help\n    -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n    -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n                  ladda Java-programmeringsspr\u00E5ksagenten, se java.lang.instrument\n    -splash:<bilds\u00F6kv\u00E4g>\n                  visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n                  HiDPI-skal\u00E4ndrade bilder st\u00F6ds automatiskt och anv\u00E4nds om de \u00E4r\n       \
+           tillg\u00E4ngliga. Filnamnet p\u00E5 den oskal\u00E4ndrade bilden, t.ex. image.ext,\n                  ska alltid \u00F6verf\u00F6ras som argument till alternativet -splash.\n                  Den l\u00E4mpligaste skal\u00E4ndrade bilden v\u00E4ljs\n                  automatiskt.\n                  Mer information finns i dokumentationen f\u00F6r API:t SplashScreen\n    @argument filer\n                  en eller flera argumentfiler som inneh\u00E5ller alternativ\n    -disable-@files\n                  f\u00F6rhindra ytterligare ut\u00F6kning av argumentfiler\nOm du vill ange ett argument f\u00F6r ett l\u00E5ngt alternativ kan du anv\u00E4nda --<namn>=<v\u00E4rde> eller\n--<namn> <v\u00E4rde>.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           avaktivera bakgrundskompilering\n    -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n                      l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n    -Xcheck:jni       utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n    -Xcomp            tvingar kompilering av metoder vid det f\u00F6rsta anropet\n    -Xdebug           tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n    -Xdiag            visa fler diagnostiska meddelanden\n    -Xdiag:resolver   visa diagnostiska meddelanden f\u00F6r matchning\n    -Xfuture          aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n    -Xint             endast exekvering i tolkat l\u00E4ge\n    -Xinternalversion\n                      visar mer detaljerad information om JVM-version \u00E4n\n                      alternativet -version\n    -Xloggc:<fil>    logga GC-status till en fil med tidsst\u00E4mplar\n    -Xmixed           exekvering i blandat l\u00E4ge (standard)\n    -Xmn<storlek>     anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n                      generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n    -Xms<storlek>     ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n    -Xmx<storlek>     ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n    -Xnoclassgc       avaktivera klasskr\u00E4pinsamling\n    -Xprof            utdata f\u00F6r processorprofilering\n    -Xrs              minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n    -Xshare:auto      anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n    -Xshare:off       f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n    -Xshare:on        kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n    -XshowSettings    visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:all\n                      visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:locale\n                      visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:properties\n                      visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -Xss<storlek>     ange storlek f\u00F6r java-tr\u00E5dsstacken\n    -Xverify          anger l\u00E4ge f\u00F6r bytekodverifieraren\n    --add-reads <modul>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att l\u00E4sa <m\u00E5lmodul>, oavsett\n                      moduldeklarationen. \n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n                      ej namngivna moduler.\n    --add-exports <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att exportera <paket> till <m\u00E5lmodul>,\n                      oavsett moduldeklarationen.\n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n                      ej namngivna moduler.\n    --add-opens <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att \u00F6ppna <paket> till\n                      <m\u00E5lmodul>, oavsett moduldeklarationen.\n    --disable-@files  avaktivera ytterligare argumentfilsut\u00F6kning\n    --patch-module <modul>=<fil>({0}<fil>)*\n                      \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n                      i JAR-filer eller kataloger.\n\nDe h\u00E4r extra alternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.
+java.launcher.X.usage=\n    -Xbatch           avaktivera bakgrundskompilering\n    -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n                      l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n    -Xcheck:jni       utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n    -Xcomp            tvingar kompilering av metoder vid det f\u00F6rsta anropet\n    -Xdebug           tillhandah\u00E5lls f\u00F6r bak\u00E5tkompatibilitet\n    -Xdiag            visa fler diagnostiska meddelanden\n    -Xfuture          aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n    -Xint             endast exekvering i tolkat l\u00E4ge\n    -Xinternalversion\n                      visar mer detaljerad information om JVM-version \u00E4n\n                      alternativet -version\n    -Xloggc:<fil>    logga GC-status till en fil med tidsst\u00E4mplar\n    -Xmixed           exekvering i blandat l\u00E4ge (standard)\n    -Xmn<storlek>     anger ursprunglig och maximal storlek (i byte) f\u00F6r h\u00F6gen f\u00F6r\n                      generationen med nyare objekt (h\u00F6gen f\u00F6r tilldelning av nya objekt)\n    -Xms<storlek>     ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n    -Xmx<storlek>     ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n    -Xnoclassgc       avaktivera klasskr\u00E4pinsamling\n    -Xprof            utdata f\u00F6r processorprofilering (inaktuellt)\n    -Xrs              minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n    -Xshare:auto      anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n    -Xshare:off       f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n    -Xshare:on        kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n    -XshowSettings    visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:all\n                      visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:locale\n                      visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:properties\n                      visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -Xss<storlek>     ange storlek f\u00F6r java-tr\u00E5dsstacken\n    -Xverify          anger l\u00E4ge f\u00F6r bytekodverifieraren\n    --add-reads <modul>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att l\u00E4sa <m\u00E5lmodul>, oavsett\n                      moduldeklarationen. \n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att l\u00E4sa alla\n                      ej namngivna moduler.\n    --add-exports <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att exportera <paket> till <m\u00E5lmodul>,\n                      oavsett moduldeklarationen.\n                      <m\u00E5lmodul> kan vara ALL-UNNAMED f\u00F6r att exportera till alla\n                      ej namngivna moduler.\n    --add-opens <modul>/<paket>=<m\u00E5lmodul>(,<m\u00E5lmodul>)*\n                      uppdaterar <modul> f\u00F6r att \u00F6ppna <paket> till\n                      <m\u00E5lmodul>, oavsett moduldeklarationen.\n    --permit-illegal-access\n                      till\u00E5t otill\u00E5ten \u00E5tkomst till medlemmar av typer i namngivna\n                      moduler av kod i ej namngivna moduler. Det h\u00E4r \n                      kompatibilitetsalternativet tas bort i n\u00E4sta utg\u00E5va.\n    --limit-modules <modulnamn>[,<modulnamn>...]\n                      begr\u00E4nsar universumet med observerbara moduler\n    --patch-module <modul>=<fil>({0}<fil>)*\n                      \u00E5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n                      i JAR-filer eller kataloger.\n    --disable-@files  avaktivera ytterligare \
+argumentfilsut\u00F6kning\n\nDe h\u00E4r extraalternativen kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r Mac OS X-specifika:\n    -XstartOnFirstThread\n                      k\u00F6r main()-metoden p\u00E5 den f\u00F6rsta (AppKit)-tr\u00E5den\n    -Xdock:name=<applikationsnamn>\n                      \u00E5sidos\u00E4tt det standardapplikationsnamn som visas i dockan\n    -Xdock:icon=<s\u00F6kv\u00E4g till ikonfil>\n                      \u00E5sidos\u00E4tt den standardikon som visas i dockan\n\n
 
-java.launcher.cls.error1=Fel: Kan inte hitta eller kan inte ladda huvudklassen {0}
+java.launcher.cls.error1=Fel: kunde inte hitta eller ladda huvudklassen {0}\nOrsakades av: {1}: {2}
 java.launcher.cls.error2=Fel: Huvudmetoden \u00E4r inte {0} i klassen {1}, definiera huvudmetoden som:\n   public static void main(String[] args)
 java.launcher.cls.error3=Fel: Huvudmetoden m\u00E5ste returnera ett v\u00E4rde av typen void i klassen {0}, \ndefiniera huvudmetoden som:\n   public static void main(String[] args)
 java.launcher.cls.error4=Fel: Huvudmetoden finns inte i klassen {0}, definiera huvudmetoden som:\n   public static void main(String[] args)\neller s\u00E5 m\u00E5ste en JavaFX-applikationsklass ut\u00F6ka {1}
 java.launcher.cls.error5=Fel: JavaFX-exekveringskomponenter saknas, och de kr\u00E4vs f\u00F6r att kunna k\u00F6ra den h\u00E4r applikationen
+java.launcher.cls.error6=Fel: LinkageError intr\u00E4ffade vid laddning av huvudklassen {0}\n\t{1}
 java.launcher.jar.error1=Fel: Ett ov\u00E4ntat fel intr\u00E4ffade n\u00E4r filen {0} skulle \u00F6ppnas
 java.launcher.jar.error2=manifest finns inte i {0}
 java.launcher.jar.error3=inget huvudmanifestattribut i {0}
+java.launcher.jar.error4=fel vid laddning av java-agenten i {0}
 java.launcher.init.error=initieringsfel
 java.launcher.javafx.error1=Fel: JavaFX launchApplication-metoden har fel signatur, den \nm\u00E5ste ha deklarerats som statisk och returnera ett v\u00E4rde av typen void
 java.launcher.module.error1=modulen {0} har inget MainClass-attribut, anv\u00E4nd -m <module>/<main-class>
 java.launcher.module.error2=Fel: kunde inte hitta eller ladda huvudklassen {0} i modulen {1}
+java.launcher.module.error3=Fel: kan inte ladda huvudklassen {0} fr\u00E5n modulen {1}\n\t{2}
+java.launcher.module.error4={0} hittades inte
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,32 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] class [args...]\n           (\u6267\u884C\u7C7B)\n   \u6216  {0} [options] -jar jarfile [args...]\n           (\u6267\u884C jar \u6587\u4EF6)\n   \u6216  {0} [options] -p <\u6A21\u5757\u8DEF\u5F84> -m <\u6A21\u5757\u540D\u79F0>[/<\u6A21\u5757\u7C7B>] [args...]\n           (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D\u9009\u9879\u5305\u62EC:\n\n
+java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] <\u4E3B\u7C7B> [args...]\n           (\u6267\u884C\u7C7B)\n   \u6216  {0} [options] -jar <jar \u6587\u4EF6> [args...]\n           (\u6267\u884C jar \u6587\u4EF6)\n   \u6216  {0} [options] -m <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n       {0} [options] --module <\u6A21\u5757>[/<\u4E3B\u7C7B>] [args...]\n           (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\n \u5C06\u4E3B\u7C7B, -jar <jar \u6587\u4EF6>, -m \u6216 --module\n <\u6A21\u5757>/<\u4E3B\u7C7B> \u540E\u7684\u53C2\u6570\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u5230\u4E3B\u7C7B\u3002\n\n \u5176\u4E2D, \u9009\u9879\u5305\u62EC:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \u5DF2\u8FC7\u65F6, \u5728\u4EE5\u540E\u7684\u53D1\u884C\u7248\u4E2D\u5C06\u88AB\u5220\u9664\n
 java.launcher.opt.vmselect   =\    {0}\t  \u9009\u62E9 "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  \u662F "{1}" VM \u7684\u540C\u4E49\u8BCD [\u5DF2\u8FC7\u65F6]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n                  \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n                  \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n    -p <\u6A21\u5757\u8DEF\u5F84>\n    --module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n    --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n                  \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n    -m <\u6A21\u5757>[/<\u4E3B\u7C7B>]\n    --module <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>]\n                  \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757, \u4EE5\u53CA\u5728\u672A\u7531\u6A21\u5757\u6307\u5B9A\u65F6\n                  \u8981\u6267\u884C\u7684\u4E3B\u7C7B\u540D\u79F0\n    --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n                  <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH\u3002\n    --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n    --list-modules [<\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]]\n                  \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n    --dry-run     \u521B\u5EFA VM \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n                  \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n                  \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u662F\u975E\u5E38\u6709\u7528\u7684\u3002\n    -D<\u540D\u79F0>=<\u503C>\n                  \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n    -verbose:[class|gc|jni]\n                  \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n    -version      \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n    --version     \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n    -showversion  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n    --show-version\n                  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n    -? -h -help\n                  \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help        \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -X            \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help-extra  \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n    -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n    -esa | -enablesystemassertions\n                  \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -dsa | \
--disablesystemassertions\n                  \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n                  \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n    -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n                  \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n    -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n                  \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n    -splash:<\u56FE\u50CF\u8DEF\u5F84>\n                  \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n                  \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n                  (\u5982\u679C\u53EF\u7528)\u3002\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n                  \u5E94\u59CB\u7EC8\u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n                  \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u9002\u5F53\u7684\u7F29\u653E\n                  \u56FE\u50CF\u3002\n                  \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\u3002\n    @<\u6587\u4EF6\u8DEF\u5F84>   \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n
+java.launcher.opt.footer = \    -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    --class-path <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n                  \u4F7F\u7528 {0} \u5206\u9694\u7684, \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n                  \u548C ZIP \u6863\u6848\u5217\u8868\u3002\n    -p <\u6A21\u5757\u8DEF\u5F84>\n    --module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n    --upgrade-module-path <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n                  \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n    --add-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\u3002\n                  <\u6A21\u5757\u540D\u79F0> \u8FD8\u53EF\u4EE5\u4E3A ALL-DEFAULT, ALL-SYSTEM,\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n    --d <\u6A21\u5757\u540D\u79F0>\n    --describe-module <\u6A21\u5757\u540D\u79F0>\n                  \u63CF\u8FF0\u6A21\u5757\u5E76\u9000\u51FA\n    --dry-run     \u521B\u5EFA VM \u5E76\u52A0\u8F7D\u4E3B\u7C7B, \u4F46\u4E0D\u6267\u884C main \u65B9\u6CD5\u3002\n                  \u6B64 --dry-run \u9009\u9879\u5BF9\u4E8E\u9A8C\u8BC1\u8BF8\u5982\n                  \u6A21\u5757\u7CFB\u7EDF\u914D\u7F6E\u8FD9\u6837\u7684\u547D\u4EE4\u884C\u9009\u9879\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n    --validate-modules\n                  \u9A8C\u8BC1\u6240\u6709\u6A21\u5757\u5E76\u9000\u51FA\n                  --validate-modules \u9009\u9879\u5BF9\u4E8E\u67E5\u627E\n                  \u6A21\u5757\u8DEF\u5F84\u4E2D\u6A21\u5757\u7684\u51B2\u7A81\u53CA\u5176\u4ED6\u9519\u8BEF\u53EF\u80FD\u975E\u5E38\u6709\u7528\u3002\n    -D<\u540D\u79F0>=<\u503C>\n                  \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n    -verbose:[class|module|gc|jni]\n                  \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n    -version      \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u9000\u51FA\n    --version     \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u9000\u51FA\n    -showversion  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\u5E76\u7EE7\u7EED\n    --show-version\n                  \u5C06\u4EA7\u54C1\u7248\u672C\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\u5E76\u7EE7\u7EED\n    --show-module-resolution\n                  \u5728\u542F\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u6A21\u5757\u89E3\u6790\u8F93\u51FA\n    -? -h -help\n                  \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help        \u5C06\u6B64\u5E2E\u52A9\u6D88\u606F\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -X            \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u9519\u8BEF\u6D41\n    --help-extra  \u5C06\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9\u8F93\u51FA\u5230\u8F93\u51FA\u6D41\n    -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n    -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \
+\u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u7981\u7528\u65AD\u8A00\n    -esa | -enablesystemassertions\n                  \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -dsa | -disablesystemassertions\n                  \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n                  \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n    -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n                  \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n    -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n                  \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n    -splash:<\u56FE\u50CF\u8DEF\u5F84>\n                  \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n                  \u81EA\u52A8\u652F\u6301\u548C\u4F7F\u7528 HiDPI \u7F29\u653E\u56FE\u50CF\n                  (\u5982\u679C\u53EF\u7528)\u3002\u5E94\u59CB\u7EC8\u5C06\u672A\u7F29\u653E\u7684\u56FE\u50CF\u6587\u4EF6\u540D (\u4F8B\u5982, image.ext)\n                  \u4F5C\u4E3A\u53C2\u6570\u4F20\u9012\u7ED9 -splash \u9009\u9879\u3002\n                  \u5C06\u81EA\u52A8\u9009\u53D6\u63D0\u4F9B\u7684\u6700\u5408\u9002\u7684\u7F29\u653E\n                  \u56FE\u50CF\u3002\n                  \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 SplashScreen API \u6587\u6863\n    @argument \u6587\u4EF6\n                  \u4E00\u4E2A\u6216\u591A\u4E2A\u5305\u542B\u9009\u9879\u7684\u53C2\u6570\u6587\u4EF6\n    -disable-@files\n                  \u963B\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\u8981\u4E3A\u957F\u9009\u9879\u6307\u5B9A\u53C2\u6570, \u53EF\u4EE5\u4F7F\u7528 --<\u540D\u79F0>=<\u503C> \u6216\n--<\u540D\u79F0> <\u503C>\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n    -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n                      \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n    -Xcheck:jni       \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n    -Xcomp            \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u7F16\u8BD1\u65B9\u6CD5\n    -Xdebug           \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n    -Xdiag            \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n    -Xdiag:resolver   \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n    -Xfuture          \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n    -Xint             \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n    -Xinternalversion\n                      \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n                      \u7248\u672C\u4FE1\u606F\n    -Xloggc:<\u6587\u4EF6>    \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n    -Xmn<\u5927\u5C0F>        \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n                      (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n    -Xms<\u5927\u5C0F>        \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n    -Xmx<\u5927\u5C0F>        \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n    -Xnoclassgc       \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n    -Xprof            \u8F93\u51FA cpu \u5206\u6790\u6570\u636E\n    -Xrs              \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n    -Xshare:off       \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n    -Xshare:on        \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n    -XshowSettings    \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:all\n                      \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:locale\n                      \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n    -XshowSettings:properties\n                      \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -Xss<\u5927\u5C0F>        \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n    -Xverify          \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n    --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n                      \u6A21\u5757\u3002\n    --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u6240\u6709\n                      \u672A\u547D\u540D\u6A21\u5757\u3002\n    --add-opens \
-<\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n                      \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n    --disable-@files  \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n    --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n                      \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n                      \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\n    -Xbatch           \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n    -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n                      \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n    -Xcheck:jni       \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n    -Xcomp            \u5728\u9996\u6B21\u8C03\u7528\u65F6\u5F3A\u5236\u4F7F\u7528\u7684\u7F16\u8BD1\u65B9\u6CD5\n    -Xdebug           \u4E3A\u5B9E\u73B0\u5411\u540E\u517C\u5BB9\u800C\u63D0\u4F9B\n    -Xdiag            \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n    -Xfuture          \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n    -Xint             \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n    -Xinternalversion\n                      \u663E\u793A\u6BD4 -version \u9009\u9879\u66F4\u8BE6\u7EC6\u7684 JVM\n                      \u7248\u672C\u4FE1\u606F\n    -Xloggc:<\u6587\u4EF6>    \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n    -Xmn<\u5927\u5C0F>        \u4E3A\u5E74\u8F7B\u4EE3 (\u65B0\u751F\u4EE3) \u8BBE\u7F6E\u521D\u59CB\u548C\u6700\u5927\u5806\u5927\u5C0F\n                      (\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D)\n    -Xms<\u5927\u5C0F>        \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n    -Xmx<\u5927\u5C0F>        \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n    -Xnoclassgc       \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n    -Xprof            \u8F93\u51FA cpu \u5206\u6790\u6570\u636E (\u5DF2\u8FC7\u65F6)\n    -Xrs              \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n    -Xshare:off       \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n    -Xshare:on        \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n    -XshowSettings    \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:all\n                      \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:locale\n                      \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EEDe\n    -XshowSettings:properties\n                      \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -Xss<\u5927\u5C0F>        \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n    -Xverify          \u8BBE\u7F6E\u5B57\u8282\u7801\u9A8C\u8BC1\u5668\u7684\u6A21\u5F0F\n    --add-reads <\u6A21\u5757>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u8BFB\u53D6 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u8BFB\u53D6\u6240\u6709\u672A\u547D\u540D\n                      \u6A21\u5757\u3002\n    --add-exports <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \u4EE5\u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230 <\u76EE\u6807\u6A21\u5757>,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n                      <\u76EE\u6807\u6A21\u5757> \u53EF\u4EE5\u662F ALL-UNNAMED \u4EE5\u5BFC\u51FA\u5230\u6240\u6709\n                      \u672A\u547D\u540D\u6A21\u5757\u3002\n    --add-opens <\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u76EE\u6807\u6A21\u5757>(,<\u76EE\u6807\u6A21\u5757>)*\n                      \u66F4\u65B0 <\u6A21\u5757> \
+\u4EE5\u5728 <\u76EE\u6807\u6A21\u5757> \u4E2D\n                      \u6253\u5F00 <\u7A0B\u5E8F\u5305>, \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\u3002\n    --permit-illegal-access\n                      \u5141\u8BB8\u901A\u8FC7\u672A\u547D\u540D\u6A21\u5757\u4E2D\u7684\u4EE3\u7801\u5BF9\u547D\u540D\u6A21\u5757\u4E2D\u7684\n                      \u7C7B\u578B\u6210\u5458\u8FDB\u884C\u975E\u6CD5\u8BBF\u95EE\u3002\u5C06\u5728\u4E0B\u4E00\u4E2A\u53D1\u884C\u7248\u4E2D\n                      \u5220\u9664\u6B64\u517C\u5BB9\u6027\u9009\u9879\u3002\n    --limit-modules <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                      \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n    --patch-module <\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n                      \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n                      \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\u3002\n    --disable-@files  \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n\u8FD9\u4E9B\u989D\u5916\u9009\u9879\u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u4E3A Mac OS X \u7279\u5B9A\u7684\u9009\u9879:\n    -XstartOnFirstThread\n                      \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n    -Xdock:name=<\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0>\n                      \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n    -Xdock:icon=<\u56FE\u6807\u6587\u4EF6\u7684\u8DEF\u5F84>\n                      \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n
 
-java.launcher.cls.error1=\u9519\u8BEF: \u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}
+java.launcher.cls.error1=\u9519\u8BEF: \u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}\n\u539F\u56E0: {1}: {2}
 java.launcher.cls.error2=\u9519\u8BEF: main \u65B9\u6CD5\u4E0D\u662F\u7C7B {1} \u4E2D\u7684{0}, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n   public static void main(String[] args)
 java.launcher.cls.error3=\u9519\u8BEF: main \u65B9\u6CD5\u5FC5\u987B\u8FD4\u56DE\u7C7B {0} \u4E2D\u7684\u7A7A\u7C7B\u578B\u503C, \u8BF7\n\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n   public static void main(String[] args)
 java.launcher.cls.error4=\u9519\u8BEF: \u5728\u7C7B {0} \u4E2D\u627E\u4E0D\u5230 main \u65B9\u6CD5, \u8BF7\u5C06 main \u65B9\u6CD5\u5B9A\u4E49\u4E3A:\n   public static void main(String[] args)\n\u5426\u5219 JavaFX \u5E94\u7528\u7A0B\u5E8F\u7C7B\u5FC5\u987B\u6269\u5C55{1}
 java.launcher.cls.error5=\u9519\u8BEF: \u7F3A\u5C11 JavaFX \u8FD0\u884C\u65F6\u7EC4\u4EF6, \u9700\u8981\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u6765\u8FD0\u884C\u6B64\u5E94\u7528\u7A0B\u5E8F
+java.launcher.cls.error6=\u9519\u8BEF: \u52A0\u8F7D\u4E3B\u7C7B {0} \u65F6\u51FA\u73B0 LinkageError\n\t{1}
 java.launcher.jar.error1=\u9519\u8BEF: \u5C1D\u8BD5\u6253\u5F00\u6587\u4EF6{0}\u65F6\u51FA\u73B0\u610F\u5916\u9519\u8BEF
 java.launcher.jar.error2=\u5728{0}\u4E2D\u627E\u4E0D\u5230\u6E05\u5355
 java.launcher.jar.error3={0}\u4E2D\u6CA1\u6709\u4E3B\u6E05\u5355\u5C5E\u6027
+java.launcher.jar.error4=\u5728 {0} \u4E2D\u52A0\u8F7D Java \u4EE3\u7406\u65F6\u51FA\u9519
 java.launcher.init.error=\u521D\u59CB\u5316\u9519\u8BEF
 java.launcher.javafx.error1=\u9519\u8BEF: JavaFX launchApplication \u65B9\u6CD5\u5177\u6709\u9519\u8BEF\u7684\u7B7E\u540D, \u5FC5\u987B\n\u5C06\u65B9\u6CD5\u58F0\u660E\u4E3A\u9759\u6001\u65B9\u6CD5\u5E76\u8FD4\u56DE\u7A7A\u7C7B\u578B\u7684\u503C
 java.launcher.module.error1=\u6A21\u5757 {0} \u4E0D\u5177\u6709 MainClass \u5C5E\u6027, \u8BF7\u4F7F\u7528 -m <module>/<main-class>
 java.launcher.module.error2=\u9519\u8BEF: \u5728\u6A21\u5757 {1} \u4E2D\u627E\u4E0D\u5230\u6216\u65E0\u6CD5\u52A0\u8F7D\u4E3B\u7C7B {0}
+java.launcher.module.error3=\u9519\u8BEF: \u65E0\u6CD5\u4ECE\u6A21\u5757 {1} \u52A0\u8F7D\u4E3B\u7C7B {0}\n\t{2}
+java.launcher.module.error4=\u627E\u4E0D\u5230{0}
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -24,32 +24,36 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] class [args...]\n           (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n   \u6216  {0} [options] -jar jarfile [args...]\n           (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n   \u6216  {0} [options] -p <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n\n
+java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] <mainclass> [args...]\n           (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n   \u6216\u8005  {0} [options] -jar <jarfile> [args...]\n           (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n   \u6216\u8005  {0} [options] -m <module>[/<mainclass>] [args...]\n       {0} [options] --module <module>[/<mainclass>] [args...]\n           (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\n \u4E3B\u8981\u985E\u5225\u3001-jar <jarfile>\u3001-m \u6216 --module <module>/<mainclass>\n \u4E4B\u5F8C\u7684\u5F15\u6578\u6703\u7576\u6210\u5F15\u6578\u50B3\u9001\u81F3\u4E3B\u8981\u985E\u5225\u3002\n\n \u5176\u4E2D\u9078\u9805\u5305\u62EC:\n\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \u5DF2\u4E0D\u518D\u4F7F\u7528\uFF0C\u5C07\u65BC\u672A\u4F86\u7248\u672C\u4E2D\u79FB\u9664\n
 java.launcher.opt.vmselect   =\    {0}\t  \u9078\u53D6 "{1}" VM\n
 java.launcher.opt.hotspot    =\    {0}\t  \u662F "{1}" VM \u7684\u540C\u7FA9\u5B57  [\u5DF2\u4E0D\u518D\u4F7F\u7528]\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n    --class-path <class search path of directories and zip/jar files>\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA\n                  ZIP \u5B58\u6A94\u6E05\u55AE\uFF0C\u5C07\u5728\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848\u3002\n    -p <module path>\n    --module-path <module path>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n    --upgrade-module-path <module path>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C \u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n                  \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n    -m <module>[/<mainclass>]\n    --module <modulename>[/<mainclass>]\n                  \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6A21\u7D44\uFF0C\u4EE5\u53CA\u8981\u57F7\u884C\u4E4B\u4E3B\u8981\u985E\u5225\n                  \u7684\u540D\u7A31 (\u82E5\u6A21\u7D44\u672A\u6307\u5B9A\u7684\u8A71)\n    --add-modules <modulename>[,<modulename>...]\n                  \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n                  <modulename> \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH\u3002\n    --limit-modules <modulename>[,<modulename>...]\n                  \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n    --list-modules [<modulename>[,<modulename>...]]\n                  \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n    --dry-run     \u5EFA\u7ACB VM \u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n                  \u6B64 --dry-run \u9078\u9805\u5C0D\u65BC\u9A57\u8B49\u547D\u4EE4\u884C\u9078\u9805\n                  (\u4F8B\u5982\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B) \u5F88\u6709\u7528\u3002\n    -D<name>=<value>\n                  \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n    -verbose:[class|gc|jni]\n                  \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n    -version      \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    --version     \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    -showversion  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n    --show-version\n                  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n    -? -h -help\n                  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    --help        \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    -X            \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    --help-extra  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -esa | -enablesystemassertions\n                  \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n    -dsa | -disablesystemassertions\n                  \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n    -agentlib:<libname>[=<options>]\n                  \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8ACB\u53C3\u95B1 \
--agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n    -javaagent:<jarpath>[=<options>]\n                  \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n    -splash:<imagepath>\n                  \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n                  \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u5DF2\u7E2E\u653E\u5F71\u50CF\n                  (\u5982\u679C\u53EF\u7528\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n                  \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u5230 -splash \u9078\u9805\u3002\n                  \u7CFB\u7D71\u6703\u81EA\u52D5\u5F9E\u63D0\u4F9B\u7684\u5DF2\u7E2E\u653E\u5F71\u50CF\u4E2D\u9078\u64C7\u6700\u9069\u5408\u7684\n                  \u5DF2\u7E2E\u653E\u5F71\u50CF\u3002\n                  \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\uFF0C\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n    @<filepath>   \u5F9E\u6307\u5B9A\u7684\u6A94\u6848\u8B80\u53D6\u9078\u9805\n\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --<name>=<value> \u6216\n--<name> <value>\u3002\n
+java.launcher.opt.footer = \    -cp <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n    -classpath <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n    --class-path <\u76EE\u9304\u548C zip/jar \u6A94\u6848\u7684\u985E\u5225\u641C\u5C0B\u8DEF\u5F91>\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\n                  \u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE (\u5C07\u65BC\u5176\u4E2D\u641C\u5C0B\u985E\u5225\u6A94\u6848)\u3002\n    -p <\u6A21\u7D44\u8DEF\u5F91>\n    --module-path <\u6A21\u7D44\u8DEF\u5F91>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\u3002\n    --upgrade-module-path <\u6A21\u7D44\u8DEF\u5F91>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u90FD\u662F\u4E00\u500B\u6A21\u7D44\u76EE\u9304\uFF0C\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\u53EF\u5347\u7D1A\n                  \u6A21\u7D44 (\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D)\n    --add-modules <module name>[,<module name>...]\n                  \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u4E4B\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\u3002\n                  <module name> \u4E5F\u53EF\u4EE5\u662F ALL-DEFAULT\u3001ALL-SYSTEM\u3001\n                  ALL-MODULE-PATH.\n    --list-modules\n                  \u5217\u51FA\u53EF\u76E3\u6E2C\u7684\u6A21\u7D44\u4E26\u7D50\u675F\n    --d <\u6A21\u7D44\u540D\u7A31>\n    --describe-module <\u6A21\u7D44\u540D\u7A31>\n                  \u63CF\u8FF0\u6A21\u7D44\u4E26\u7D50\u675F\n    --dry-run     \u5EFA\u7ACB VM \u4E26\u8F09\u5165\u4E3B\u8981\u985E\u5225\uFF0C\u4F46\u4E0D\u57F7\u884C\u4E3B\u8981\u65B9\u6CD5\u3002\n                  --dry-run \u9078\u9805\u9069\u5408\u7528\u5728\u9A57\u8B49\n                  \u50CF\u6A21\u7D44\u7CFB\u7D71\u7D44\u614B\u7684\u547D\u4EE4\u884C\u9078\u9805\u3002\n    --validate-modules\n                  \u9A57\u8B49\u6240\u6709\u6A21\u7D44\u4E26\u7D50\u675F\n                  --validate-modules \u9078\u9805\u9069\u5408\u7528\u5728\u5C0B\u627E\n                  \u6A21\u7D44\u8DEF\u5F91\u4E0A\u4E4B\u6A21\u7D44\u7684\u885D\u7A81\u548C\u5176\u4ED6\u932F\u8AA4\u3002\n    -D<name>=<value>\n                  \u8A2D\u5B9A\u7CFB\u7D71\u7279\u6027\n    -verbose:[class|module|gc|jni]\n                  \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n    -version      \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    --version      \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    -showversion  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    --show-version\n                  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    --show-module-resolution\n                  \u5728\u555F\u52D5\u6642\u986F\u793A\u6A21\u7D44\u89E3\u6790\u8F38\u51FA\n    -? -h -help\n                  \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    --help        \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u6B64\u8AAA\u660E\u8A0A\u606F\n    -X            \u5728\u932F\u8AA4\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    --help-extra  \u5728\u8F38\u51FA\u4E32\u6D41\u5370\u51FA\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u555F\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u505C\u7528\u6307\u5B9A\u4E4B\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -esa | -enablesystemassertions\n               \
+   \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n    -dsa | -disablesystemassertions\n                  \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n    -agentlib:<libname>[=<options>]\n                  \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u4F9D\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n    -javaagent:<jarpath>[=<options>]\n                  \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n    -splash:<imagepath>\n                  \u986F\u793A\u542B\u6307\u5B9A\u5F71\u50CF\u7684\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n                  \u7CFB\u7D71\u6703\u81EA\u52D5\u652F\u63F4\u4E26\u4F7F\u7528 HiDPI \u7E2E\u653E\u7684\u5F71\u50CF\n                  (\u82E5\u6709\u7684\u8A71)\u3002\u672A\u7E2E\u653E\u5F71\u50CF\u6A94\u6848\u540D\u7A31 (\u4F8B\u5982 image.ext)\n                  \u61C9\u4E00\u5F8B\u4EE5\u5F15\u6578\u7684\u5F62\u5F0F\u50B3\u9001\u7D66 -splash \u9078\u9805\u3002\n                  \u7CFB\u7D71\u5C07\u6703\u81EA\u52D5\u9078\u64C7\u4F7F\u7528\u6700\u9069\u5408\u7684\u7E2E\u653E\u5F71\u50CF\n                  \u3002\n                  \u8ACB\u53C3\u95B1 SplashScreen API \u6587\u4EF6\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002\n    @argument files\n                  \u4E00\u6216\u591A\u500B\u5305\u542B\u9078\u9805\u7684\u5F15\u6578\u6A94\u6848\n    -disable-@files\n                  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\u82E5\u8981\u6307\u5B9A\u9577\u9078\u9805\u7684\u5F15\u6578\uFF0C\u53EF\u4EE5\u4F7F\u7528 --<name>=<value> \u6216\n--<name> <value>\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\n    -Xbatch           \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n    -Xbootclasspath/a:<directories and zip/jar files separated by {0}>\n                      \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n    -Xcheck:jni       \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n    -Xcomp            \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n    -Xdebug           \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n    -Xdiag            \u986F\u793A\u5176\u4ED6\u8A3A\u65B7\u8A0A\u606F\n    -Xdiag:resolver   \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n    -Xfuture          \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n    -Xint             \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n    -Xinternalversion\n                      \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n                      JVM \u7248\u672C\u8CC7\u8A0A\n    -Xloggc:<file>    \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n    -Xmn<size>        \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n                      \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n    -Xms<size>        \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n    -Xmx<size>        \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n    -Xnoclassgc       \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n    -Xprof            \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599\n    -Xrs              \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n    -Xshare:off       \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n    -Xshare:on        \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n    -XshowSettings    \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:all\n                      \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:locale\n                      \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:properties\n                      \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -Xss<size>        \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n    -Xverify          \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u8B80\u53D6 <target-module>\uFF0C\u7121\u8AD6\n                      \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002 \n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n                      \u6A21\u7D44\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u532F\u51FA\u81F3 <target-module>\uFF0C\n                      \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n                      \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \
-\u4EE5\u4FBF\u5C07 <package> \u958B\u555F\u81F3\n                      <target-module>\uFF0C\u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n    --disable-@files  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n    --patch-module <module>=<file>({0}<file>)*\n                      \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n                      \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\n    -Xbatch           \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n    -Xbootclasspath/a:<\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n                      \u9644\u52A0\u81F3\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n    -Xcheck:jni       \u57F7\u884C\u984D\u5916\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n    -Xcomp            \u5F37\u5236\u7DE8\u8B6F\u7B2C\u4E00\u500B\u547C\u53EB\u7684\u65B9\u6CD5\n    -Xdebug           \u91DD\u5C0D\u56DE\u6EAF\u76F8\u5BB9\u6027\u63D0\u4F9B\n    -Xdiag            \u986F\u793A\u984D\u5916\u7684\u8A3A\u65B7\u8A0A\u606F\n    -Xfuture          \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n    -Xint             \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n    -Xinternalversion\n                      \u986F\u793A\u6BD4 -version \u9078\u9805\u66F4\u70BA\u8A73\u7D30\u7684\n                      JVM \u7248\u672C\u8CC7\u8A0A\n    -Xloggc:<file>    \u5C07 GC \u72C0\u614B\u8A18\u9304\u81F3\u6A94\u6848\u4E14\u9023\u540C\u6642\u6233\n    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n    -Xmn<size>        \u8A2D\u5B9A\u65B0\u751F\u4EE3 (\u990A\u6210\u5340) \u4E4B\u5806\u96C6\u7684\u8D77\u59CB\u5927\u5C0F\u548C\n                      \u5927\u5C0F\u4E0A\u9650 (\u4F4D\u5143\u7D44)\n    -Xms<size>        \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n    -Xmx<size>        \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n    -Xnoclassgc       \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n    -Xprof            \u8F38\u51FA cpu \u5206\u6790\u8CC7\u6599 (\u5DF2\u4E0D\u518D\u4F7F\u7528)\n    -Xrs              \u6E1B\u5C11 Java/VM \u4F7F\u7528\u7684\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u6CC1\u4E0B\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n    -Xshare:off       \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n    -Xshare:on        \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u6703\u5931\u6557\u3002\n    -XshowSettings    \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:all\n                      \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:locale\n                      \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:properties\n                      \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\u9032\u884C\u4F5C\u696D\n    -Xss<size>        \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n    -Xverify          \u8A2D\u5B9A Bytecode \u9A57\u8B49\u7A0B\u5F0F\u7684\u6A21\u5F0F\n    --add-reads <module>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u8B80\u53D6 <target-module>\uFF0C\u4E0D\u8AD6\n                      \u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u8B80\u53D6\u6240\u6709\u672A\u547D\u540D\u7684\n                      \u6A21\u7D44\u3002\n    --add-exports <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \u4EE5\u4FBF\u5C07 <package> \u532F\u51FA\u81F3 <target-module>\uFF0C\n                      \u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n                      \u53EF\u5C07 <target-module> \u8A2D\u70BA ALL-UNNAMED \u4EE5\u532F\u51FA\u81F3\u6240\u6709\n                      \u672A\u547D\u540D\u7684\u6A21\u7D44\u3002\n    --add-opens <module>/<package>=<target-module>(,<target-module>)*\n                      \u66F4\u65B0 <module> \
+\u4EE5\u4FBF\u5C07 <package> \u958B\u555F\u81F3\n                      <target-module>\uFF0C\u4E0D\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\u3002\n    --permit-illegal-access\n                      \u5141\u8A31\u672A\u547D\u540D\u6A21\u7D44\u4E2D\u7684\u7A0B\u5F0F\u78BC\u5C0D\u5DF2\u547D\u540D\u6A21\u7D44\u4E2D\u7684\n                      \u985E\u578B\u6210\u54E1\u9032\u884C\u975E\u6CD5\u5B58\u53D6\u3002\u6B64\u76F8\u5BB9\u6027\u9078\u9805\u5C07\u5728\n                      \u4E0B\u4E00\u500B\u7248\u672C\u4E2D\u79FB\u9664\u3002\n    --limit-modules <module name>[,<module name>...]\n                      \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n    --patch-module <module>=<file>({0}<file>)*\n                      \u8986\u5BEB\u6216\u52A0\u5F37\u542B\u6709 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\n                      \u985E\u5225\u548C\u8CC7\u6E90\u7684\u6A21\u7D44\u3002\n    --disable-@files  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n\u4E0A\u8FF0\u7684\u984D\u5916\u9078\u9805\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u4E0B\u5217\u662F Mac OS X \u7279\u5B9A\u9078\u9805:\n    -XstartOnFirstThread\n                      \u5728\u7B2C\u4E00\u500B (AppKit) \u57F7\u884C\u7DD2\u57F7\u884C main() \u65B9\u6CD5\n    -Xdock:name=<application name>\n                      \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u61C9\u7528\u7A0B\u5F0F\u540D\u7A31\n    -Xdock:icon=<path to icon file>\n                      \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u5716\u793A\n\n
 
-java.launcher.cls.error1=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}
+java.launcher.cls.error1=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\u539F\u56E0: {1}: {2}
 java.launcher.cls.error2=\u932F\u8AA4: \u4E3B\u8981\u65B9\u6CD5\u4E0D\u662F\u985E\u5225 {1} \u4E2D\u7684 {0}\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n   public static void main(String[] args)
 java.launcher.cls.error3=\u932F\u8AA4: \u4E3B\u8981\u65B9\u6CD5\u5FC5\u9808\u50B3\u56DE\u985E\u5225 {0} \u4E2D void \u985E\u578B\u7684\u503C\uFF0C\n\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n   public static void main(String[] args)
 java.launcher.cls.error4=\u932F\u8AA4: \u5728\u985E\u5225 {0} \u4E2D\u627E\u4E0D\u5230\u4E3B\u8981\u65B9\u6CD5\uFF0C\u8ACB\u5B9A\u7FA9\u4E3B\u8981\u65B9\u6CD5\u70BA:\n   public static void main(String[] args)\n\u6216\u8005 JavaFX \u61C9\u7528\u7A0B\u5F0F\u985E\u5225\u5FC5\u9808\u64F4\u5145 {1}
 java.launcher.cls.error5=\u932F\u8AA4: \u907A\u6F0F\u57F7\u884C\u6B64\u61C9\u7528\u7A0B\u5F0F\u6240\u9700\u7684 JavaFX \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5143\u4EF6
+java.launcher.cls.error6=\u932F\u8AA4: \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0} \u6642\u767C\u751F LinkageError\n\t{1}
 java.launcher.jar.error1=\u932F\u8AA4: \u5617\u8A66\u958B\u555F\u6A94\u6848 {0} \u6642\u767C\u751F\u672A\u9810\u671F\u7684\u932F\u8AA4
 java.launcher.jar.error2=\u5728 {0} \u4E2D\u627E\u4E0D\u5230\u8CC7\u8A0A\u6E05\u55AE
 java.launcher.jar.error3={0} \u4E2D\u6C92\u6709\u4E3B\u8981\u8CC7\u8A0A\u6E05\u55AE\u5C6C\u6027
+java.launcher.jar.error4=\u8F09\u5165 {0} \u4E2D\u7684 Java \u4EE3\u7406\u7A0B\u5F0F\u6642\u767C\u751F\u932F\u8AA4
 java.launcher.init.error=\u521D\u59CB\u5316\u932F\u8AA4
 java.launcher.javafx.error1=\u932F\u8AA4: JavaFX launchApplication \u65B9\u6CD5\u7684\u7C3D\u7AE0\u932F\u8AA4\uFF0C\u5B83\n\u5FC5\u9808\u5BA3\u544A\u70BA\u975C\u614B\u4E26\u50B3\u56DE void \u985E\u578B\u7684\u503C
 java.launcher.module.error1=\u6A21\u7D44 {0} \u4E0D\u542B MainClass \u5C6C\u6027\uFF0C\u8ACB\u4F7F\u7528 -m <module>/<main-class>
 java.launcher.module.error2=\u932F\u8AA4: \u627E\u4E0D\u5230\u6216\u7121\u6CD5\u8F09\u5165\u6A21\u7D44 {1} \u4E2D\u7684\u4E3B\u8981\u985E\u5225 {0}
+java.launcher.module.error3=\u932F\u8AA4: \u7121\u6CD5\u5F9E\u6A21\u7D44 {1} \u8F09\u5165\u4E3B\u8981\u985E\u5225 {0}\n\t{2}
+java.launcher.module.error4=\u627E\u4E0D\u5230 {0}
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -123,9 +123,30 @@
                 tmp.add(t);
             }
         }
+        // If a constructor has a mandated outer this, that parameter
+        // has no annotations and the annotations to parameter mapping
+        // should be offset by 1.
+        boolean offset = false;
+        if (decl instanceof Constructor) {
+            Constructor<?> ctor = (Constructor<?>) decl;
+            Class<?> declaringClass = ctor.getDeclaringClass();
+            if (!declaringClass.isEnum() &&
+                (declaringClass.isMemberClass() &&
+                 (declaringClass.getModifiers() & Modifier.STATIC) == 0) ) {
+                offset = true;
+            }
+        }
         for (int i = 0; i < size; i++) {
-            @SuppressWarnings("unchecked")
-            ArrayList<TypeAnnotation> list = l[i];
+            ArrayList<TypeAnnotation> list;
+            if (offset) {
+                @SuppressWarnings("unchecked")
+                ArrayList<TypeAnnotation> tmp = (i == 0) ? null : l[i - 1];
+                list = tmp;
+            } else {
+                @SuppressWarnings("unchecked")
+                ArrayList<TypeAnnotation> tmp = l[i];
+                list = tmp;
+            }
             TypeAnnotation[] typeAnnotations;
             if (list != null) {
                 typeAnnotations = list.toArray(new TypeAnnotation[list.size()]);
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_de.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "Aliasnamen eingeben:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(RETURN, wenn identisch mit <{0}>)"},
-        {".PATTERN.printX509Cert",
-                "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nAlgorithmus des Public Key von Betreff: {8} ({9,number,#})\nVersion: {10}"},
         {"What.is.your.first.and.last.name.",
                 "Wie lautet Ihr Vor- und Nachname?"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "Geben Sie -keysize zum Erstellen eines Secret Keys an"},
 
-        {"verified.by.s.in.s", "Gepr\u00FCft von %s in %s"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "WARNUNG: Nicht gepr\u00FCft. Stellen Sie sicher, dass -keystore korrekt ist."},
 
         {"Extensions.", "Erweiterungen: "},
         {".Empty.value.", "(Leerer Wert)"},
         {"Extension.Request.", "Erweiterungsanforderung:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "PKCS #10-Zertifikatanforderung (Version 1.0)\nSubjekt: %s\nPublic Key: %s Format %s Schl\u00FCssel\n"},
         {"Unknown.keyUsage.type.", "Unbekannter keyUsage-Typ: "},
         {"Unknown.extendedkeyUsage.type.", "Unbekannter extendedkeyUsage-Typ: "},
         {"Unknown.AccessDescription.type.", "Unbekannter AccessDescription-Typ: "},
@@ -438,7 +433,33 @@
                  "Erweiterung kann nicht als \"Kritisch\" markiert werden. "},
         {"Odd.number.of.hex.digits.found.", "Ungerade Anzahl hexadezimaler Ziffern gefunden: "},
         {"Unknown.extension.type.", "Unbekannter Erweiterungstyp: "},
-        {"command.{0}.is.ambiguous.", "Befehl {0} ist mehrdeutig:"}
+        {"command.{0}.is.ambiguous.", "Befehl {0} ist mehrdeutig:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "Die Zertifikatsanforderung"},
+        {"the.issuer", "Der Aussteller"},
+        {"the.generated.certificate", "Das generierte Zertifikat"},
+        {"the.generated.crl", "Die generierte CRL"},
+        {"the.generated.certificate.request", "Die generierte Zertifikatsanforderung"},
+        {"the.certificate", "Das Zertifikat"},
+        {"the.crl", "Die CRL"},
+        {"the.tsa.certificate", "Das TSA-Zertifikat"},
+        {"the.input", "Die Eingabe"},
+        {"reply", "Antwort"},
+        {"one.in.many", "%s #%d von %d"},
+        {"alias.in.cacerts", "Aussteller <%s> in cacerts"},
+        {"alias.in.keystore", "Aussteller <%s>"},
+        {"with.weak", "%s (schwach)"},
+        {"key.bit", "%d-Bit-%s-Schl\u00FCssel"},
+        {"key.bit.weak", "%d-Bit-%s-Schl\u00FCssel (schwach)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "Eigent\u00FCmer: {0}\nAussteller: {1}\nSeriennummer: {2}\nG\u00FCltig von: {3} bis: {4}\nZertifikatsfingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgorithmusname: {7}\nPublic Key-Algorithmus von Subject: {8}\nVersion: {9}"},
+        {"PKCS.10.with.weak",
+                "PKCS #10-Zertifikatsanforderung (Version 1.0)\nSubject: %s\nFormat: %s\nPublic Key: %s\nSignaturalgorithmus: %s\n"},
+        {"verified.by.s.in.s.weak", "Von %s in %s mit %s verifiziert"},
+        {"whose.sigalg.risk", "%s verwendet den Signaturalgorithmus %s. Dies gilt als Sicherheitsrisiko."},
+        {"whose.key.risk", "%s verwendet %s. Dies gilt als Sicherheitsrisiko."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_es.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "Introduzca el nombre de alias:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(INTRO si es el mismo que para <{0}>)"},
-        {".PATTERN.printX509Cert",
-                "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8} ({9,number,#})\nVersi\u00F3n: {10}"},
         {"What.is.your.first.and.last.name.",
                 "\u00BFCu\u00E1les son su nombre y su apellido?"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "Proporcione el valor de -keysize para la generaci\u00F3n de claves secretas"},
 
-        {"verified.by.s.in.s", "Verificado por %s en %s"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "ADVERTENCIA: no se ha verificado. Aseg\u00FArese de que el valor de -keystore es correcto."},
 
         {"Extensions.", "Extensiones: "},
         {".Empty.value.", "(Valor vac\u00EDo)"},
         {"Extension.Request.", "Solicitud de Extensi\u00F3n:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "Solicitud de Certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nClave P\u00FAblica: %s formato %s clave\n"},
         {"Unknown.keyUsage.type.", "Tipo de uso de clave desconocido: "},
         {"Unknown.extendedkeyUsage.type.", "Tipo de uso de clave extendida desconocido: "},
         {"Unknown.AccessDescription.type.", "Tipo de descripci\u00F3n de acceso desconocido: "},
@@ -438,7 +433,33 @@
                  "Esta extensi\u00F3n no se puede marcar como cr\u00EDtica. "},
         {"Odd.number.of.hex.digits.found.", "Se ha encontrado un n\u00FAmero impar de d\u00EDgitos hexadecimales: "},
         {"Unknown.extension.type.", "Tipo de extensi\u00F3n desconocida: "},
-        {"command.{0}.is.ambiguous.", "El comando {0} es ambiguo:"}
+        {"command.{0}.is.ambiguous.", "El comando {0} es ambiguo:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "La solicitud de certificado"},
+        {"the.issuer", "El emisor"},
+        {"the.generated.certificate", "El certificado generado"},
+        {"the.generated.crl", "La CRL generada"},
+        {"the.generated.certificate.request", "La solicitud de certificado generada"},
+        {"the.certificate", "El certificado"},
+        {"the.crl", "La CRL"},
+        {"the.tsa.certificate", "El certificado de TSA"},
+        {"the.input", "La entrada"},
+        {"reply", "Responder"},
+        {"one.in.many", "%s #%d de %d"},
+        {"alias.in.cacerts", "Emisor <%s> en cacerts"},
+        {"alias.in.keystore", "Emisor <%s>"},
+        {"with.weak", "%s (d\u00E9bil)"},
+        {"key.bit", "Clave %s de %d bits"},
+        {"key.bit.weak", "Clave %s de %d bits (d\u00E9bil)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "Propietario: {0}\nEmisor: {1}\nN\u00FAmero de serie: {2}\nV\u00E1lido desde: {3} hasta: {4}\nHuellas digitales del certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNombre del algoritmo de firma: {7}\nAlgoritmo de clave p\u00FAblica de asunto: {8}\nVersi\u00F3n: {9}"},
+        {"PKCS.10.with.weak",
+                "Solicitud de certificado PKCS #10 (Versi\u00F3n 1.0)\nAsunto: %s\nFormato: %s\nClave p\u00FAblica:%s\nAlgoritmo de firma: %s\n"},
+        {"verified.by.s.in.s.weak", "Verificado por %s en %s con %s"},
+        {"whose.sigalg.risk", "%s usa el algoritmo de firma %s, lo que se considera un riesgo de seguridad."},
+        {"whose.key.risk", "%s usa %s, lo que se considera un riesgo de seguridad."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_fr.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "Indiquez le nom d'alias :  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(appuyez sur Entr\u00E9e si le r\u00E9sultat est identique \u00E0 <{0}>)"},
-        {".PATTERN.printX509Cert",
-                "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du : {3} au : {4}\nEmpreintes du certificat :\n\t SHA1 : {5}\n\t SHA256 : {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8} ({9,number,#})\nVersion : {10}"},
         {"What.is.your.first.and.last.name.",
                 "Quels sont vos nom et pr\u00E9nom ?"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "Indiquez -keysize pour la g\u00E9n\u00E9ration de la cl\u00E9 secr\u00E8te"},
 
-        {"verified.by.s.in.s", "V\u00E9rifi\u00E9 par %s dans %s"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "AVERTISSEMENT : non v\u00E9rifi\u00E9. Assurez-vous que -keystore est correct."},
 
         {"Extensions.", "Extensions\u00A0: "},
         {".Empty.value.", "(Valeur vide)"},
         {"Extension.Request.", "Demande d'extension :"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nCl\u00E9 publique : format %s pour la cl\u00E9 %s\n"},
         {"Unknown.keyUsage.type.", "Type keyUsage inconnu : "},
         {"Unknown.extendedkeyUsage.type.", "Type extendedkeyUsage inconnu : "},
         {"Unknown.AccessDescription.type.", "Type AccessDescription inconnu : "},
@@ -438,7 +433,33 @@
                  "Cette extension ne peut pas \u00EAtre marqu\u00E9e comme critique. "},
         {"Odd.number.of.hex.digits.found.", "Nombre impair de chiffres hexad\u00E9cimaux trouv\u00E9 : "},
         {"Unknown.extension.type.", "Type d'extension inconnu : "},
-        {"command.{0}.is.ambiguous.", "commande {0} ambigu\u00EB :"}
+        {"command.{0}.is.ambiguous.", "commande {0} ambigu\u00EB :"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "Demande de certificat"},
+        {"the.issuer", "Emetteur"},
+        {"the.generated.certificate", "Certificat g\u00E9n\u00E9r\u00E9"},
+        {"the.generated.crl", "Liste des certificats r\u00E9voqu\u00E9s g\u00E9n\u00E9r\u00E9e"},
+        {"the.generated.certificate.request", "Demande de certificat g\u00E9n\u00E9r\u00E9"},
+        {"the.certificate", "Certificat"},
+        {"the.crl", "Liste de certificats r\u00E9voqu\u00E9s"},
+        {"the.tsa.certificate", "Certificat TSA"},
+        {"the.input", "Entr\u00E9e"},
+        {"reply", "R\u00E9pondre"},
+        {"one.in.many", "%s #%d sur %d"},
+        {"alias.in.cacerts", "Emetteur <%s> dans les certificats CA"},
+        {"alias.in.keystore", "Emetteur <%s>"},
+        {"with.weak", "%s (faible)"},
+        {"key.bit", "Cl\u00E9 %s %d bits"},
+        {"key.bit.weak", "Cl\u00E9 %s %d bits (faible)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "Propri\u00E9taire : {0}\nEmetteur : {1}\nNum\u00E9ro de s\u00E9rie : {2}\nValide du {3} au {4}\nEmpreintes du certificat :\n\t SHA 1: {5}\n\t SHA 256: {6}\nNom de l''algorithme de signature : {7}\nAlgorithme de cl\u00E9 publique du sujet : {8}\nVersion : {9}"},
+        {"PKCS.10.with.weak",
+                "Demande de certificat PKCS #10 (version 1.0)\nSujet : %s\nFormat : %s\nCl\u00E9 publique : %s\nAlgorithme de signature : %s\n"},
+        {"verified.by.s.in.s.weak", "V\u00E9rifi\u00E9 par %s dans %s avec un \u00E9l\u00E9ment %s"},
+        {"whose.sigalg.risk", "%s utilise l'algorithme de signature %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
+        {"whose.key.risk", "%s utilise un \u00E9l\u00E9ment %s, qui repr\u00E9sente un risque pour la s\u00E9curit\u00E9."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_it.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "Immettere nome alias:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(INVIO se corrisponde al nome di <{0}>)"},
-        {".PATTERN.printX509Cert",
-                "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nCopie di certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8} ({9,number,#})\nVersione: {10}"},
         {"What.is.your.first.and.last.name.",
                 "Specificare nome e cognome"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "Specificare il valore -keysize per la generazione della chiave segreta"},
 
-        {"verified.by.s.in.s", "Verificato da %s in %s"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "AVVERTENZA: non verificato. Assicurarsi che -keystore sia corretto."},
 
         {"Extensions.", "Estensioni: "},
         {".Empty.value.", "(valore vuoto)"},
         {"Extension.Request.", "Richiesta di estensione:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nChiave pubblica: %s formato %s chiave\n"},
         {"Unknown.keyUsage.type.", "Tipo keyUsage sconosciuto: "},
         {"Unknown.extendedkeyUsage.type.", "Tipo extendedkeyUsage sconosciuto: "},
         {"Unknown.AccessDescription.type.", "Tipo AccessDescription sconosciuto: "},
@@ -438,7 +433,33 @@
                  "Impossibile contrassegnare questa estensione come critica. "},
         {"Odd.number.of.hex.digits.found.", "\u00C8 stato trovato un numero dispari di cifre esadecimali: "},
         {"Unknown.extension.type.", "Tipo di estensione sconosciuto: "},
-        {"command.{0}.is.ambiguous.", "il comando {0} \u00E8 ambiguo:"}
+        {"command.{0}.is.ambiguous.", "il comando {0} \u00E8 ambiguo:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "La richiesta di certificato"},
+        {"the.issuer", "L'emittente"},
+        {"the.generated.certificate", "Il certificato generato"},
+        {"the.generated.crl", "La CRL generata"},
+        {"the.generated.certificate.request", "La richiesta di certificato generata"},
+        {"the.certificate", "Il certificato"},
+        {"the.crl", "La CRL"},
+        {"the.tsa.certificate", "Il certificato TSA"},
+        {"the.input", "L'input"},
+        {"reply", "Rispondi"},
+        {"one.in.many", "%s #%d di %d"},
+        {"alias.in.cacerts", "Emittente <%s> in cacerts"},
+        {"alias.in.keystore", "Emittente <%s>"},
+        {"with.weak", "%s (debole)"},
+        {"key.bit", "Chiave %s a %d bit"},
+        {"key.bit.weak", "Chiave %s a %d bit (debole)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "Proprietario: {0}\nEmittente: {1}\nNumero di serie: {2}\nValido da: {3} a: {4}\nImpronte digitali certificato:\n\t SHA1: {5}\n\t SHA256: {6}\nNome algoritmo firma: {7}\nAlgoritmo di chiave pubblica oggetto: {8}\nVersione: {9}"},
+        {"PKCS.10.with.weak",
+                "Richiesta di certificato PKCS #10 (versione 1.0)\nOggetto: %s\nFormato: %s\nChiave pubblica: %s\nAlgoritmo firma: %s\n"},
+        {"verified.by.s.in.s.weak", "Verificato da %s in %s con un %s"},
+        {"whose.sigalg.risk", "%s utilizza l'algoritmo firma %s che \u00E8 considerato un rischio per la sicurezza."},
+        {"whose.key.risk", "%s utilizza un %s che \u00E8 considerato un rischio per la sicurezza."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ja.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "\u5225\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(<{0}>\u3068\u540C\u3058\u5834\u5408\u306FRETURN\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044)"},
-        {".PATTERN.printX509Cert",
-                "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8} ({9,number,#})\n\u30D0\u30FC\u30B8\u30E7\u30F3: {10}"},
         {"What.is.your.first.and.last.name.",
                 "\u59D3\u540D\u306F\u4F55\u3067\u3059\u304B\u3002"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "\u79D8\u5BC6\u9375\u306E\u751F\u6210\u6642\u306B\u306F -keysize\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044"},
 
-        {"verified.by.s.in.s", "%s(%s\u5185)\u306B\u3088\u308A\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "\u8B66\u544A: \u691C\u8A3C\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002-keystore\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
 
         {"Extensions.", "\u62E1\u5F35: "},
         {".Empty.value.", "(\u7A7A\u306E\u5024)"},
         {"Extension.Request.", "\u62E1\u5F35\u30EA\u30AF\u30A8\u30B9\u30C8:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u516C\u958B\u9375: %s \u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s \u30AD\u30FC\n"},
         {"Unknown.keyUsage.type.", "\u4E0D\u660E\u306AkeyUsage\u30BF\u30A4\u30D7: "},
         {"Unknown.extendedkeyUsage.type.", "\u4E0D\u660E\u306AextendedkeyUsage\u30BF\u30A4\u30D7: "},
         {"Unknown.AccessDescription.type.", "\u4E0D\u660E\u306AAccessDescription\u30BF\u30A4\u30D7: "},
@@ -438,7 +433,33 @@
                  "\u3053\u306E\u62E1\u5F35\u306F\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u3068\u3057\u3066\u30DE\u30FC\u30AF\u4ED8\u3051\u3067\u304D\u307E\u305B\u3093\u3002 "},
         {"Odd.number.of.hex.digits.found.", "\u5947\u6570\u306E16\u9032\u6570\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: "},
         {"Unknown.extension.type.", "\u4E0D\u660E\u306A\u62E1\u5F35\u30BF\u30A4\u30D7: "},
-        {"command.{0}.is.ambiguous.", "\u30B3\u30DE\u30F3\u30C9{0}\u306F\u3042\u3044\u307E\u3044\u3067\u3059:"}
+        {"command.{0}.is.ambiguous.", "\u30B3\u30DE\u30F3\u30C9{0}\u306F\u3042\u3044\u307E\u3044\u3067\u3059:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8"},
+        {"the.issuer", "\u767A\u884C\u8005"},
+        {"the.generated.certificate", "\u751F\u6210\u3055\u308C\u305F\u8A3C\u660E\u66F8"},
+        {"the.generated.crl", "\u751F\u6210\u3055\u308C\u305FCRL"},
+        {"the.generated.certificate.request", "\u751F\u6210\u3055\u308C\u305F\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8"},
+        {"the.certificate", "\u8A3C\u660E\u66F8"},
+        {"the.crl", "CRL"},
+        {"the.tsa.certificate", "TSA\u8A3C\u660E\u66F8"},
+        {"the.input", "\u5165\u529B"},
+        {"reply", "\u5FDC\u7B54"},
+        {"one.in.many", "%s #%d / %d"},
+        {"alias.in.cacerts", "cacerts\u5185\u306E\u767A\u884C\u8005<%s>"},
+        {"alias.in.keystore", "\u767A\u884C\u8005<%s>"},
+        {"with.weak", "%s (\u5F31)"},
+        {"key.bit", "%d\u30D3\u30C3\u30C8%s\u9375"},
+        {"key.bit.weak", "%d\u30D3\u30C3\u30C8%s\u9375(\u5F31)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "\u6240\u6709\u8005: {0}\n\u767A\u884C\u8005: {1}\n\u30B7\u30EA\u30A2\u30EB\u756A\u53F7: {2}\n\u6709\u52B9\u671F\u9593\u306E\u958B\u59CB\u65E5: {3}\u7D42\u4E86\u65E5: {4}\n\u8A3C\u660E\u66F8\u306E\u30D5\u30A3\u30F3\u30AC\u30D7\u30EA\u30F3\u30C8:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u540D: {7}\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u516C\u958B\u9375\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: {8}\n\u30D0\u30FC\u30B8\u30E7\u30F3: {9}"},
+        {"PKCS.10.with.weak",
+                "PKCS #10\u8A3C\u660E\u66F8\u30EA\u30AF\u30A8\u30B9\u30C8(\u30D0\u30FC\u30B8\u30E7\u30F31.0)\n\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: %s\n\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 %s\n\u516C\u958B\u9375: %s\n\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0: %s\n"},
+        {"verified.by.s.in.s.weak", "%s(%s\u5185)\u306B\u3088\u308A%s\u3067\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F"},
+        {"whose.sigalg.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u7F72\u540D\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"},
+        {"whose.key.risk", "%s\u306F\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30EA\u30B9\u30AF\u3068\u307F\u306A\u3055\u308C\u308B%s\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002"},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -325,7 +325,7 @@
                 "\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
         {"Your.keystore.contains.keyStore.size.entries",
                 "\uD0A4 \uC800\uC7A5\uC18C\uC5D0 {0,number,integer}\uAC1C\uC758 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
-        {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
+        {"Failed.to.parse.input", "\uC785\uB825\uAC12\uC758 \uAD6C\uBB38\uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
         {"Empty.input", "\uC785\uB825\uAC12\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."},
         {"Not.X.509.certificate", "X.509 \uC778\uC99D\uC11C\uAC00 \uC544\uB2D9\uB2C8\uB2E4."},
         {"alias.has.no.public.key", "{0}\uC5D0 \uACF5\uC6A9 \uD0A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "\uBCC4\uCE6D \uC774\uB984 \uC785\uB825:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(<{0}>\uACFC(\uC640) \uB3D9\uC77C\uD55C \uACBD\uC6B0 Enter \uD0A4\uB97C \uB204\uB984)"},
-        {".PATTERN.printX509Cert",
-                "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8} ({9,number,#})\n\uBC84\uC804: {10}"},
         {"What.is.your.first.and.last.name.",
                 "\uC774\uB984\uACFC \uC131\uC744 \uC785\uB825\uD558\uC2ED\uC2DC\uC624."},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "\uBCF4\uC548 \uD0A4\uB97C \uC0DD\uC131\uD558\uB824\uBA74 -keysize\uB97C \uC81C\uACF5\uD558\uC2ED\uC2DC\uC624."},
 
-        {"verified.by.s.in.s", "%s(%s)\uC5D0 \uC758\uD574 \uD655\uC778\uB428"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "\uACBD\uACE0: \uD655\uC778\uB418\uC9C0 \uC54A\uC74C. -keystore\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
 
         {"Extensions.", "\uD655\uC7A5: "},
         {".Empty.value.", "(\uBE44\uC5B4 \uC788\uB294 \uAC12)"},
         {"Extension.Request.", "\uD655\uC7A5 \uC694\uCCAD:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uACF5\uC6A9 \uD0A4: %s \uD615\uC2DD %s \uD0A4\n"},
         {"Unknown.keyUsage.type.", "\uC54C \uC218 \uC5C6\uB294 keyUsage \uC720\uD615: "},
         {"Unknown.extendedkeyUsage.type.", "\uC54C \uC218 \uC5C6\uB294 extendedkeyUsage \uC720\uD615: "},
         {"Unknown.AccessDescription.type.", "\uC54C \uC218 \uC5C6\uB294 AccessDescription \uC720\uD615: "},
@@ -438,7 +433,33 @@
                  "\uC774 \uD655\uC7A5\uC740 \uC911\uC694\uD55C \uAC83\uC73C\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. "},
         {"Odd.number.of.hex.digits.found.", "\uD640\uC218 \uAC1C\uC758 16\uC9C4\uC218\uAC00 \uBC1C\uACAC\uB428: "},
         {"Unknown.extension.type.", "\uC54C \uC218 \uC5C6\uB294 \uD655\uC7A5 \uC720\uD615: "},
-        {"command.{0}.is.ambiguous.", "{0} \uBA85\uB839\uC774 \uBAA8\uD638\uD568:"}
+        {"command.{0}.is.ambiguous.", "{0} \uBA85\uB839\uC774 \uBAA8\uD638\uD568:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "\uC778\uC99D\uC11C \uC694\uCCAD"},
+        {"the.issuer", "\uBC1C\uD589\uC790"},
+        {"the.generated.certificate", "\uC0DD\uC131\uB41C \uC778\uC99D\uC11C"},
+        {"the.generated.crl", "\uC0DD\uC131\uB41C CRL"},
+        {"the.generated.certificate.request", "\uC0DD\uC131\uB41C \uC778\uC99D\uC11C \uC694\uCCAD"},
+        {"the.certificate", "\uC778\uC99D\uC11C"},
+        {"the.crl", "CRL"},
+        {"the.tsa.certificate", "TSA \uC778\uC99D\uC11C"},
+        {"the.input", "\uC785\uB825"},
+        {"reply", "\uD68C\uC2E0"},
+        {"one.in.many", "%s #%d/%d"},
+        {"alias.in.cacerts", "cacerts\uC758 <%s> \uBC1C\uD589\uC790"},
+        {"alias.in.keystore", "<%s> \uBC1C\uD589\uC790"},
+        {"with.weak", "%s(\uC57D\uD568)"},
+        {"key.bit", "%d\uBE44\uD2B8 %s \uD0A4"},
+        {"key.bit.weak", "%d\uBE44\uD2B8 %s \uD0A4(\uC57D\uD568)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "\uC18C\uC720\uC790: {0}\n\uBC1C\uD589\uC790: {1}\n\uC77C\uB828 \uBC88\uD638: {2}\n\uC801\uD569\uD55C \uC2DC\uC791 \uB0A0\uC9DC: {3} \uC885\uB8CC \uB0A0\uC9DC: {4}\n\uC778\uC99D\uC11C \uC9C0\uBB38:\n\t SHA1: {5}\n\t SHA256: {6}\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998 \uC774\uB984: {7}\n\uC8FC\uCCB4 \uACF5\uC6A9 \uD0A4 \uC54C\uACE0\uB9AC\uC998: {8}\n\uBC84\uC804: {9}"},
+        {"PKCS.10.with.weak",
+                "PKCS #10 \uC778\uC99D\uC11C \uC694\uCCAD(1.0 \uBC84\uC804)\n\uC81C\uBAA9: %s\n\uD615\uC2DD: %s\n\uACF5\uC6A9 \uD0A4: %s\n\uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998: %s\n"},
+        {"verified.by.s.in.s.weak", "%s\uC774(\uAC00) %s\uC5D0\uC11C %s\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uD655\uC778"},
+        {"whose.sigalg.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s \uC11C\uBA85 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
+        {"whose.key.risk", "%s\uC774(\uAC00) \uBCF4\uC548 \uC704\uD5D8\uC73C\uB85C \uAC04\uC8FC\uB418\uB294 %s\uC744(\uB97C) \uC0AC\uC6A9\uD569\uB2C8\uB2E4."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_pt_BR.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "Informe o nome do alias:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(RETURN se for igual ao de <{0}>)"},
-        {".PATTERN.printX509Cert",
-                "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de {3} at\u00E9 {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8} ({9,number,#})\nVers\u00E3o: {10}"},
         {"What.is.your.first.and.last.name.",
                 "Qual \u00E9 o seu nome e o seu sobrenome?"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "Forne\u00E7a o -keysize para a gera\u00E7\u00E3o da chave secreta"},
 
-        {"verified.by.s.in.s", "Verificado por %s em %s"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "ADVERT\u00CANCIA: n\u00E3o verificado. Certifique-se que -keystore esteja correto."},
 
         {"Extensions.", "Extens\u00F5es: "},
         {".Empty.value.", "(Valor vazio)"},
         {"Extension.Request.", "Solicita\u00E7\u00E3o de Extens\u00E3o:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nChave P\u00FAblica: %s formato %s chave\n"},
         {"Unknown.keyUsage.type.", "Tipo de keyUsage desconhecido: "},
         {"Unknown.extendedkeyUsage.type.", "Tipo de extendedkeyUsage desconhecido: "},
         {"Unknown.AccessDescription.type.", "Tipo de AccessDescription desconhecido: "},
@@ -438,7 +433,33 @@
                  "Esta extens\u00E3o n\u00E3o pode ser marcada como cr\u00EDtica. "},
         {"Odd.number.of.hex.digits.found.", "Encontrado n\u00FAmero \u00EDmpar de seis d\u00EDgitos: "},
         {"Unknown.extension.type.", "Tipo de extens\u00E3o desconhecido: "},
-        {"command.{0}.is.ambiguous.", "o comando {0} \u00E9 amb\u00EDguo:"}
+        {"command.{0}.is.ambiguous.", "o comando {0} \u00E9 amb\u00EDguo:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "A solicita\u00E7\u00E3o do certificado"},
+        {"the.issuer", "O emissor"},
+        {"the.generated.certificate", "O certificado gerado"},
+        {"the.generated.crl", "A CRL gerada"},
+        {"the.generated.certificate.request", "A solicita\u00E7\u00E3o do certificado gerada"},
+        {"the.certificate", "O certificado"},
+        {"the.crl", "A CRL"},
+        {"the.tsa.certificate", "O certificado TSA"},
+        {"the.input", "A entrada"},
+        {"reply", "Resposta"},
+        {"one.in.many", "%s #%d de %d"},
+        {"alias.in.cacerts", "Emissor <%s> no cacerts"},
+        {"alias.in.keystore", "Emissor <%s>"},
+        {"with.weak", "%s (fraca)"},
+        {"key.bit", "Chave %s de %d bits"},
+        {"key.bit.weak", "Chave %s de %d bits (fraca)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "Propriet\u00E1rio: {0}\nEmissor: {1}\nN\u00FAmero de s\u00E9rie: {2}\nV\u00E1lido de: {3} at\u00E9: {4}\nFingerprints do certificado:\n\t SHA1: {5}\n\t SHA256: {6}\nNome do algoritmo de assinatura: {7}\nAlgoritmo de Chave P\u00FAblica do Assunto: {8}\nVers\u00E3o: {9}"},
+        {"PKCS.10.with.weak",
+                "Solicita\u00E7\u00E3o do Certificado PKCS #10 (Vers\u00E3o 1.0)\nAssunto: %s\nFormato: %s\nChave P\u00FAblica: %s\nAlgoritmo de assinatura: %s\n"},
+        {"verified.by.s.in.s.weak", "Verificado por %s em %s com um %s"},
+        {"whose.sigalg.risk", "%s usa o algoritmo de assinatura %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
+        {"whose.key.risk", "%s usa um %s que \u00E9 considerado um risco \u00E0 seguran\u00E7a."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_sv.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@
         {"Changes.an.entry.s.alias",
                 "\u00C4ndrar postalias"}, //-changealias
         {"Deletes.an.entry",
-                "Tar bort post"}, //-delete
+                "Tar bort en post"}, //-delete
         {"Exports.certificate",
                 "Exporterar certifikat"}, //-exportcert
         {"Generates.a.key.pair",
@@ -183,7 +183,7 @@
         {"validity.number.of.days",
                 "antal dagar f\u00F6r giltighet"}, //-validity
         {"Serial.ID.of.cert.to.revoke",
-                 "Seriellt id f\u00F6r certifikat som ska \u00E5terkallas"}, //-id
+                 "Serienummer p\u00E5 certifikat som ska \u00E5terkallas"}, //-id
         // keytool: Running part
         {"keytool.error.", "nyckelverktygsfel: "},
         {"Illegal.option.", "Otill\u00E5tet alternativ:  "},
@@ -278,7 +278,7 @@
                 "Certifikatet har inte lagts till i nyckellagret"},
         {".Storing.ksfname.", "[Lagrar {0}]"},
         {"alias.has.no.public.key.certificate.",
-                "{0} saknar offentlig nyckel (certifikat)"},
+                "{0} saknar \u00F6ppen nyckel (certifikat)"},
         {"Cannot.derive.signature.algorithm",
                 "Kan inte h\u00E4rleda signaturalgoritm"},
         {"Alias.alias.does.not.exist",
@@ -328,7 +328,7 @@
         {"Failed.to.parse.input", "Kunde inte tolka indata"},
         {"Empty.input", "Inga indata"},
         {"Not.X.509.certificate", "Inte ett X.509-certifikat"},
-        {"alias.has.no.public.key", "{0} saknar offentlig nyckel"},
+        {"alias.has.no.public.key", "{0} saknar \u00F6ppen nyckel"},
         {"alias.has.no.X.509.certificate", "{0} saknar X.509-certifikat"},
         {"New.certificate.self.signed.", "Nytt certifikat (sj\u00E4lvsignerat):"},
         {"Reply.has.no.certificates", "Svaret saknar certifikat"},
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "Ange aliasnamn:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(RETURN om det \u00E4r det samma som f\u00F6r <{0}>)"},
-        {".PATTERN.printX509Cert",
-                "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\n\u00C4mne f\u00F6r algoritm f\u00F6r \u00F6ppen nyckel: {8} ({9,number,#})\nVersion: {10}"},
         {"What.is.your.first.and.last.name.",
                 "Vad heter du i f\u00F6r- och efternamn?"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -383,7 +381,7 @@
 
         {".WARNING.WARNING.WARNING.",
             "*****************  WARNING WARNING WARNING  *****************"},
-        {"Signer.d.", "Signerare #%d:"},
+        {"Signer.d.", "Undertecknare %d:"},
         {"Timestamp.", "Tidsst\u00E4mpel:"},
         {"Signature.", "Signatur:"},
         {"CRLs.", "CRL:er:"},
@@ -398,7 +396,7 @@
             "* Integriteten f\u00F6r den information som lagras i srckeystore*\n* har INTE verifierats!  Om du vill verifiera dess integritet *\n* m\u00E5ste du ange l\u00F6senordet f\u00F6r srckeystore.                *"},
 
         {"Certificate.reply.does.not.contain.public.key.for.alias.",
-                "Certifikatsvaret inneh\u00E5ller inte n\u00E5gon offentlig nyckel f\u00F6r <{0}>"},
+                "Certifikatsvaret inneh\u00E5ller inte n\u00E5gon \u00F6ppen nyckel f\u00F6r <{0}>"},
         {"Incomplete.certificate.chain.in.reply",
                 "Ofullst\u00E4ndig certifikatskedja i svaret"},
         {"Certificate.chain.in.reply.does.not.verify.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "Ange -keysize f\u00F6r att skapa hemlig nyckel"},
 
-        {"verified.by.s.in.s", "Verifierad av %s i %s"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "VARNING: ej verifierad. Se till att -nyckellager \u00E4r korrekt."},
 
         {"Extensions.", "Till\u00E4gg: "},
         {".Empty.value.", "(Tomt v\u00E4rde)"},
         {"Extension.Request.", "Till\u00E4ggsbeg\u00E4ran:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "PKCS #10 certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nAllm\u00E4n nyckel: %s-format %s-nyckel\n"},
         {"Unknown.keyUsage.type.", "Ok\u00E4nd keyUsage-typ: "},
         {"Unknown.extendedkeyUsage.type.", "Ok\u00E4nd extendedkeyUsage-typ: "},
         {"Unknown.AccessDescription.type.", "Ok\u00E4nd AccessDescription-typ: "},
@@ -438,7 +433,33 @@
                  "Detta till\u00E4gg kan inte markeras som kritiskt. "},
         {"Odd.number.of.hex.digits.found.", "Udda antal hex-siffror p\u00E5tr\u00E4ffades: "},
         {"Unknown.extension.type.", "Ok\u00E4nd till\u00E4ggstyp: "},
-        {"command.{0}.is.ambiguous.", "kommandot {0} \u00E4r tvetydigt:"}
+        {"command.{0}.is.ambiguous.", "kommandot {0} \u00E4r tvetydigt:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "Certifikatbeg\u00E4ran"},
+        {"the.issuer", "Utf\u00E4rdaren"},
+        {"the.generated.certificate", "Det genererade certifikatet"},
+        {"the.generated.crl", "Den genererade listan \u00F6ver \u00E5terkallade certifikat"},
+        {"the.generated.certificate.request", "Den genererade certifikatbeg\u00E4ran"},
+        {"the.certificate", "Certifikatet"},
+        {"the.crl", "Listan \u00F6ver \u00E5terkallade certifikat"},
+        {"the.tsa.certificate", "TSA-certifikatet"},
+        {"the.input", "Indata"},
+        {"reply", "Svar"},
+        {"one.in.many", "%s %d av %d"},
+        {"alias.in.cacerts", "Utf\u00E4rdaren <%s> i cacerts"},
+        {"alias.in.keystore", "Utf\u00E4rdaren <%s>"},
+        {"with.weak", "%s (svag)"},
+        {"key.bit", "%d-bitars %s-nyckel"},
+        {"key.bit.weak", "%d-bitars %s-nyckel (svag)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "\u00C4gare: {0}\nUtf\u00E4rdare: {1}\nSerienummer: {2}\nGiltigt fr\u00E5n: {3}, till: {4}\nCertifikatfingeravtryck:\n\t SHA1: {5}\n\t SHA256: {6}\nSignaturalgoritmnamn: {7}\nAlgoritm f\u00F6r \u00F6ppen nyckel f\u00F6r \u00E4mne: {8}\nVersion: {9}"},
+        {"PKCS.10.with.weak",
+                "PKCS #10-certifikatbeg\u00E4ran (version 1.0)\n\u00C4mne: %s\nFormat: %s\n\u00D6ppen nyckel: %s\nSignaturalgoritm: %s\n"},
+        {"verified.by.s.in.s.weak", "Verifierades av %s i %s med en %s"},
+        {"whose.sigalg.risk", "%s anv\u00E4nder signaturalgoritmen %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
+        {"whose.key.risk", "%s anv\u00E4nder en %s, vilket anses utg\u00F6ra en s\u00E4kerhetsrisk."},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_CN.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "\u8F93\u5165\u522B\u540D:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(\u5982\u679C\u548C <{0}> \u76F8\u540C, \u5219\u6309\u56DE\u8F66)"},
-        {".PATTERN.printX509Cert",
-                "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8} ({9,number,#})\n\u7248\u672C: {10}"},
         {"What.is.your.first.and.last.name.",
                 "\u60A8\u7684\u540D\u5B57\u4E0E\u59D3\u6C0F\u662F\u4EC0\u4E48?"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "\u8BF7\u63D0\u4F9B -keysize \u4EE5\u751F\u6210\u5BC6\u94A5"},
 
-        {"verified.by.s.in.s", "\u7531 %s \u9A8C\u8BC1(\u5728 %s \u4E2D)"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "\u8B66\u544A: \u672A\u9A8C\u8BC1\u3002\u8BF7\u786E\u4FDD\u5BC6\u94A5\u5E93\u662F\u6B63\u786E\u7684\u3002"},
 
         {"Extensions.", "\u6269\u5C55: "},
         {".Empty.value.", "(\u7A7A\u503C)"},
         {"Extension.Request.", "\u6269\u5C55\u8BF7\u6C42:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9898: %s\n\u516C\u5171\u5BC6\u94A5: %s \u683C\u5F0F %s \u5BC6\u94A5\n"},
         {"Unknown.keyUsage.type.", "\u672A\u77E5 keyUsage \u7C7B\u578B: "},
         {"Unknown.extendedkeyUsage.type.", "\u672A\u77E5 extendedkeyUsage \u7C7B\u578B: "},
         {"Unknown.AccessDescription.type.", "\u672A\u77E5 AccessDescription \u7C7B\u578B: "},
@@ -438,7 +433,33 @@
                  "\u65E0\u6CD5\u5C06\u6B64\u6269\u5C55\u6807\u8BB0\u4E3A\u201C\u4E25\u91CD\u201D\u3002"},
         {"Odd.number.of.hex.digits.found.", "\u627E\u5230\u5947\u6570\u4E2A\u5341\u516D\u8FDB\u5236\u6570\u5B57: "},
         {"Unknown.extension.type.", "\u672A\u77E5\u6269\u5C55\u7C7B\u578B: "},
-        {"command.{0}.is.ambiguous.", "\u547D\u4EE4{0}\u4E0D\u660E\u786E:"}
+        {"command.{0}.is.ambiguous.", "\u547D\u4EE4{0}\u4E0D\u660E\u786E:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "\u8BC1\u4E66\u8BF7\u6C42"},
+        {"the.issuer", "\u53D1\u5E03\u8005"},
+        {"the.generated.certificate", "\u751F\u6210\u7684\u8BC1\u4E66"},
+        {"the.generated.crl", "\u751F\u6210\u7684 CRL"},
+        {"the.generated.certificate.request", "\u751F\u6210\u7684\u8BC1\u4E66\u8BF7\u6C42"},
+        {"the.certificate", "\u8BC1\u4E66"},
+        {"the.crl", "CRL"},
+        {"the.tsa.certificate", "TSA \u8BC1\u4E66"},
+        {"the.input", "\u8F93\u5165"},
+        {"reply", "\u56DE\u590D"},
+        {"one.in.many", "%s #%d/%d"},
+        {"alias.in.cacerts", "cacerts \u4E2D\u7684\u53D1\u5E03\u8005 <%s>"},
+        {"alias.in.keystore", "\u53D1\u5E03\u8005 <%s>"},
+        {"with.weak", "%s (\u5F31)"},
+        {"key.bit", "%d \u4F4D %s \u5BC6\u94A5"},
+        {"key.bit.weak", "%d \u4F4D %s \u5BC6\u94A5 (\u5F31)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "\u6240\u6709\u8005: {0}\n\u53D1\u5E03\u8005: {1}\n\u5E8F\u5217\u53F7: {2}\n\u751F\u6548\u65F6\u95F4: {3}, \u5931\u6548\u65F6\u95F4: {4}\n\u8BC1\u4E66\u6307\u7EB9:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7B7E\u540D\u7B97\u6CD5\u540D\u79F0: {7}\n\u4E3B\u4F53\u516C\u5171\u5BC6\u94A5\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"},
+        {"PKCS.10.with.weak",
+                "PKCS #10 \u8BC1\u4E66\u8BF7\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u4F53: %s\n\u683C\u5F0F: %s\n\u516C\u5171\u5BC6\u94A5: %s\n\u7B7E\u540D\u7B97\u6CD5: %s\n"},
+        {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A8C\u8BC1"},
+        {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7B7E\u540D\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
+        {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98CE\u9669\u3002"},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources_zh_TW.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -357,8 +357,6 @@
         {"Enter.alias.name.", "\u8F38\u5165\u5225\u540D\u540D\u7A31:  "},
         {".RETURN.if.same.as.for.otherAlias.",
                 "\t(RETURN \u5982\u679C\u548C <{0}> \u7684\u76F8\u540C)"},
-        {".PATTERN.printX509Cert",
-                "\u64C1\u6709\u8005: {0}\n\u767C\u51FA\u8005: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8} ({9,number,#})\n\u7248\u672C: {10}"},
         {"What.is.your.first.and.last.name.",
                 "\u60A8\u7684\u540D\u5B57\u8207\u59D3\u6C0F\u70BA\u4F55\uFF1F"},
         {"What.is.the.name.of.your.organizational.unit.",
@@ -421,15 +419,12 @@
         {"Please.provide.keysize.for.secret.key.generation",
                 "\u8ACB\u63D0\u4F9B -keysize \u4EE5\u7522\u751F\u79D8\u5BC6\u91D1\u9470"},
 
-        {"verified.by.s.in.s", "\u7531 %s \u9A57\u8B49 (\u5728 %s \u4E2D)"},
         {"warning.not.verified.make.sure.keystore.is.correct",
             "\u8B66\u544A: \u672A\u9A57\u8B49\u3002\u8ACB\u78BA\u5B9A -keystore \u6B63\u78BA\u3002"},
 
         {"Extensions.", "\u64F4\u5145\u5957\u4EF6: "},
         {".Empty.value.", "(\u7A7A\u767D\u503C)"},
         {"Extension.Request.", "\u64F4\u5145\u5957\u4EF6\u8981\u6C42:"},
-        {"PKCS.10.Certificate.Request.Version.1.0.Subject.s.Public.Key.s.format.s.key.",
-                "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u516C\u7528\u91D1\u9470: %s \u683C\u5F0F %s \u91D1\u9470\n"},
         {"Unknown.keyUsage.type.", "\u4E0D\u660E\u7684 keyUsage \u985E\u578B: "},
         {"Unknown.extendedkeyUsage.type.", "\u4E0D\u660E\u7684 extendedkeyUsage \u985E\u578B: "},
         {"Unknown.AccessDescription.type.", "\u4E0D\u660E\u7684 AccessDescription \u985E\u578B: "},
@@ -438,7 +433,33 @@
                  "\u6B64\u64F4\u5145\u5957\u4EF6\u7121\u6CD5\u6A19\u793A\u70BA\u95DC\u9375\u3002"},
         {"Odd.number.of.hex.digits.found.", "\u627E\u5230\u5341\u516D\u9032\u4F4D\u6578\u5B57\u7684\u5947\u6578: "},
         {"Unknown.extension.type.", "\u4E0D\u660E\u7684\u64F4\u5145\u5957\u4EF6\u985E\u578B: "},
-        {"command.{0}.is.ambiguous.", "\u547D\u4EE4 {0} \u4E0D\u660E\u78BA:"}
+        {"command.{0}.is.ambiguous.", "\u547D\u4EE4 {0} \u4E0D\u660E\u78BA:"},
+
+        // 8171319: keytool should print out warnings when reading or
+        // generating cert/cert req using weak algorithms
+        {"the.certificate.request", "\u6191\u8B49\u8981\u6C42"},
+        {"the.issuer", "\u767C\u884C\u4EBA"},
+        {"the.generated.certificate", "\u7522\u751F\u7684\u6191\u8B49"},
+        {"the.generated.crl", "\u7522\u751F\u7684 CRL"},
+        {"the.generated.certificate.request", "\u7522\u751F\u7684\u6191\u8B49\u8981\u6C42"},
+        {"the.certificate", "\u6191\u8B49"},
+        {"the.crl", "CRL"},
+        {"the.tsa.certificate", "TSA \u6191\u8B49"},
+        {"the.input", "\u8F38\u5165"},
+        {"reply", "\u56DE\u8986"},
+        {"one.in.many", "%s #%d / %d"},
+        {"alias.in.cacerts", "cacerts \u4E2D\u7684\u767C\u884C\u4EBA <%s>"},
+        {"alias.in.keystore", "\u767C\u884C\u4EBA <%s>"},
+        {"with.weak", "%s (\u4F4E\u5F37\u5EA6)"},
+        {"key.bit", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470"},
+        {"key.bit.weak", "%d \u4F4D\u5143\u7684 %s \u91D1\u9470 (\u4F4E\u5F37\u5EA6)"},
+        {".PATTERN.printX509Cert.with.weak",
+                "\u64C1\u6709\u8005: {0}\n\u767C\u884C\u4EBA: {1}\n\u5E8F\u865F: {2}\n\u6709\u6548\u671F\u81EA: {3} \u5230: {4}\n\u6191\u8B49\u6307\u7D0B:\n\t SHA1: {5}\n\t SHA256: {6}\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5\u540D\u7A31: {7}\n\u4E3B\u9AD4\u516C\u958B\u91D1\u9470\u6F14\u7B97\u6CD5: {8}\n\u7248\u672C: {9}"},
+        {"PKCS.10.with.weak",
+                "PKCS #10 \u6191\u8B49\u8981\u6C42 (\u7248\u672C 1.0)\n\u4E3B\u9AD4: %s\n\u683C\u5F0F: %s\n\u516C\u7528\u91D1\u9470: %s\n\u7C3D\u7AE0\u6F14\u7B97\u6CD5: %s\n"},
+        {"verified.by.s.in.s.weak", "\u7531 %2$s \u4E2D\u7684 %1$s \u4EE5 %3$s \u9A57\u8B49"},
+        {"whose.sigalg.risk", "%s \u4F7F\u7528\u7684 %s \u7C3D\u7AE0\u6F14\u7B97\u6CD5\u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
+        {"whose.key.risk", "%s \u4F7F\u7528\u7684 %s \u5B58\u5728\u5B89\u5168\u98A8\u96AA\u3002"},
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -27,6 +27,8 @@
 
 import java.util.HashSet;
 import java.util.Set;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.regex.Pattern;
 
 /**
@@ -134,6 +136,23 @@
         return elements;
     }
 
+    /**
+     * Get aliases of the specified algorithm.
+     *
+     * May support more algorithms in the future.
+     */
+    public static Collection<String> getAliases(String algorithm) {
+        String[] aliases;
+        if (algorithm.equalsIgnoreCase("DH") ||
+                algorithm.equalsIgnoreCase("DiffieHellman")) {
+            aliases = new String[] {"DH", "DiffieHellman"};
+        } else {
+            aliases = new String[] {algorithm};
+        }
+
+        return Arrays.asList(aliases);
+    }
+
     private static void hasLoop(Set<String> elements, String find, String replace) {
         if (elements.contains(find)) {
             if (!elements.contains(replace)) {
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,7 +99,7 @@
         /***    EVERYTHING BELOW IS DEPRECATED  ***/
 
         // com.sun.security.auth.PolicyFile
-        {".error.parsing.", ": \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958 "},
+        {".error.parsing.", ": \uAD6C\uBB38\uBD84\uC11D \uC624\uB958 "},
         {"COLON", ": "},
         {".error.adding.Permission.", ": \uAD8C\uD55C \uCD94\uAC00 \uC624\uB958 "},
         {"SPACE", " "},
--- a/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/AuthResources_sv.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -137,7 +137,7 @@
         // provided.null.name is the NullPointerException message when a
         // developer incorrectly passes a null name to the constructor of
         // subclasses of java.security.Principal
-        {"provided.null.name", "angav null-namn"}
+        {"provided.null.name", "null-namn angavs"}
 
     };
 
--- a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,6 +45,7 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
+import java.util.Collection;
 import java.util.StringTokenizer;
 import java.util.TimeZone;
 import java.util.regex.Pattern;
@@ -106,7 +107,15 @@
     @Override
     public final boolean permits(Set<CryptoPrimitive> primitives,
             String algorithm, AlgorithmParameters parameters) {
-        return checkAlgorithm(disabledAlgorithms, algorithm, decomposer);
+        if (!checkAlgorithm(disabledAlgorithms, algorithm, decomposer)) {
+            return false;
+        }
+
+        if (parameters != null) {
+            return algorithmConstraints.permits(algorithm, parameters);
+        }
+
+        return true;
     }
 
     /*
@@ -242,7 +251,12 @@
                 List<Constraint> constraintList =
                         constraintsMap.getOrDefault(algorithm,
                                 new ArrayList<>(1));
-                constraintsMap.putIfAbsent(algorithm, constraintList);
+
+                // Consider the impact of algorithm aliases.
+                for (String alias : AlgorithmDecomposer.getAliases(algorithm)) {
+                    constraintsMap.putIfAbsent(alias, constraintList);
+                }
+
                 if (space <= 0) {
                     constraintList.add(new DisabledConstraint(algorithm));
                     continue;
@@ -351,6 +365,27 @@
             return true;
         }
 
+        // Check if constraints permit this AlgorithmParameters.
+        public boolean permits(String algorithm, AlgorithmParameters aps) {
+            List<Constraint> list = getConstraints(algorithm);
+            if (list == null) {
+                return true;
+            }
+
+            for (Constraint constraint : list) {
+                if (!constraint.permits(aps)) {
+                    if (debug != null) {
+                        debug.println("keySizeConstraint: failed algorithm " +
+                                "parameters constraint check " + aps);
+                    }
+
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
         // Check if constraints permit this cert.
         public void permits(String algorithm, ConstraintsParameters cp)
                 throws CertPathValidatorException {
@@ -445,6 +480,18 @@
         }
 
         /**
+         * Check if the algorithm constraint permits a given cryptographic
+         * parameters.
+         *
+         * @param parameters the cryptographic parameters
+         * @return 'true' if the cryptographic parameters is allowed,
+         *         'false' ortherwise.
+         */
+        public boolean permits(AlgorithmParameters parameters) {
+            return true;
+        }
+
+        /**
          * Check if an algorithm constraint is permitted with a given
          * ConstraintsParameters.
          *
@@ -528,6 +575,7 @@
          * call next() for any following constraints. If it does not, exit
          * as this constraint(s) does not restrict the operation.
          */
+        @Override
         public void permits(ConstraintsParameters cp)
                 throws CertPathValidatorException {
             if (debug != null) {
@@ -551,100 +599,101 @@
      * This class handles the denyAfter constraint.  The date is in the UTC/GMT
      * timezone.
      */
-     private static class DenyAfterConstraint extends Constraint {
-         private Date denyAfterDate;
-         private static final SimpleDateFormat dateFormat =
-                 new SimpleDateFormat("EEE, MMM d HH:mm:ss z yyyy");
+    private static class DenyAfterConstraint extends Constraint {
+        private Date denyAfterDate;
+        private static final SimpleDateFormat dateFormat =
+                new SimpleDateFormat("EEE, MMM d HH:mm:ss z yyyy");
 
-         DenyAfterConstraint(String algo, int year, int month, int day) {
-             Calendar c;
+        DenyAfterConstraint(String algo, int year, int month, int day) {
+            Calendar c;
 
-             algorithm = algo;
+            algorithm = algo;
 
-             if (debug != null) {
-                 debug.println("DenyAfterConstraint read in as:  year " +
-                         year + ", month = " + month + ", day = " + day);
-             }
+            if (debug != null) {
+                debug.println("DenyAfterConstraint read in as:  year " +
+                        year + ", month = " + month + ", day = " + day);
+            }
 
-             c = new Calendar.Builder().setTimeZone(TimeZone.getTimeZone("GMT"))
-                     .setDate(year, month - 1, day).build();
+            c = new Calendar.Builder().setTimeZone(TimeZone.getTimeZone("GMT"))
+                    .setDate(year, month - 1, day).build();
 
-             if (year > c.getActualMaximum(Calendar.YEAR) ||
-                     year < c.getActualMinimum(Calendar.YEAR)) {
-                 throw new IllegalArgumentException(
-                         "Invalid year given in constraint: " + year);
-             }
-             if ((month - 1) > c.getActualMaximum(Calendar.MONTH) ||
-                     (month - 1) < c.getActualMinimum(Calendar.MONTH)) {
-                 throw new IllegalArgumentException(
-                         "Invalid month given in constraint: " + month);
-             }
-             if (day > c.getActualMaximum(Calendar.DAY_OF_MONTH) ||
-                     day < c.getActualMinimum(Calendar.DAY_OF_MONTH)) {
-                 throw new IllegalArgumentException(
-                         "Invalid Day of Month given in constraint: " + day);
-             }
+            if (year > c.getActualMaximum(Calendar.YEAR) ||
+                    year < c.getActualMinimum(Calendar.YEAR)) {
+                throw new IllegalArgumentException(
+                        "Invalid year given in constraint: " + year);
+            }
+            if ((month - 1) > c.getActualMaximum(Calendar.MONTH) ||
+                    (month - 1) < c.getActualMinimum(Calendar.MONTH)) {
+                throw new IllegalArgumentException(
+                        "Invalid month given in constraint: " + month);
+            }
+            if (day > c.getActualMaximum(Calendar.DAY_OF_MONTH) ||
+                    day < c.getActualMinimum(Calendar.DAY_OF_MONTH)) {
+                throw new IllegalArgumentException(
+                        "Invalid Day of Month given in constraint: " + day);
+            }
 
-             denyAfterDate = c.getTime();
-             if (debug != null) {
-                 debug.println("DenyAfterConstraint date set to: " +
-                         dateFormat.format(denyAfterDate));
-             }
-         }
+            denyAfterDate = c.getTime();
+            if (debug != null) {
+                debug.println("DenyAfterConstraint date set to: " +
+                        dateFormat.format(denyAfterDate));
+            }
+        }
 
-         /*
-          * Checking that the provided date is not beyond the constraint date.
-          * The provided date can be the PKIXParameter date if given,
-          * otherwise it is the current date.
-          *
-          * If the constraint disallows, call next() for any following
-          * constraints. Throw an exception if this is the last constraint.
-          */
-         @Override
-         public void permits(ConstraintsParameters cp)
-                 throws CertPathValidatorException {
-             Date currentDate;
-             String errmsg;
+        /*
+         * Checking that the provided date is not beyond the constraint date.
+         * The provided date can be the PKIXParameter date if given,
+         * otherwise it is the current date.
+         *
+         * If the constraint disallows, call next() for any following
+         * constraints. Throw an exception if this is the last constraint.
+         */
+        @Override
+        public void permits(ConstraintsParameters cp)
+                throws CertPathValidatorException {
+            Date currentDate;
+            String errmsg;
 
-             if (cp.getJARTimestamp() != null) {
-                 currentDate = cp.getJARTimestamp().getTimestamp();
-                 errmsg = "JAR Timestamp date: ";
-             } else if (cp.getPKIXParamDate() != null) {
-                 currentDate = cp.getPKIXParamDate();
-                 errmsg = "PKIXParameter date: ";
-             } else {
-                 currentDate = new Date();
-                 errmsg = "Current date: ";
-             }
+            if (cp.getJARTimestamp() != null) {
+                currentDate = cp.getJARTimestamp().getTimestamp();
+                errmsg = "JAR Timestamp date: ";
+            } else if (cp.getPKIXParamDate() != null) {
+                currentDate = cp.getPKIXParamDate();
+                errmsg = "PKIXParameter date: ";
+            } else {
+                currentDate = new Date();
+                errmsg = "Current date: ";
+            }
 
-             if (!denyAfterDate.after(currentDate)) {
-                 if (next(cp)) {
-                     return;
-                 }
-                 throw new CertPathValidatorException(
-                         "denyAfter constraint check failed: " + algorithm +
-                         " used with Constraint date: " +
-                         dateFormat.format(denyAfterDate) + "; " + errmsg +
-                         dateFormat.format(currentDate) + extendedMsg(cp),
-                         null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
-             }
-         }
+            if (!denyAfterDate.after(currentDate)) {
+                if (next(cp)) {
+                    return;
+                }
+                throw new CertPathValidatorException(
+                        "denyAfter constraint check failed: " + algorithm +
+                        " used with Constraint date: " +
+                        dateFormat.format(denyAfterDate) + "; " + errmsg +
+                        dateFormat.format(currentDate) + extendedMsg(cp),
+                        null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
+            }
+        }
 
-         /*
-          * Return result if the constraint's date is beyond the current date
-          * in UTC timezone.
-          */
-         public boolean permits(Key key) {
-             if (next(key)) {
-                 return true;
-             }
-             if (debug != null) {
-                 debug.println("DenyAfterConstraints.permits(): " + algorithm);
-             }
+        /*
+         * Return result if the constraint's date is beyond the current date
+         * in UTC timezone.
+         */
+        @Override
+        public boolean permits(Key key) {
+            if (next(key)) {
+                return true;
+            }
+            if (debug != null) {
+                debug.println("DenyAfterConstraints.permits(): " + algorithm);
+            }
 
-             return denyAfterDate.after(new Date());
-         }
-     }
+            return denyAfterDate.after(new Date());
+        }
+    }
 
     /*
      * The usage constraint is for the "usage" keyword.  It checks against the
@@ -658,6 +707,7 @@
             this.usages = usages;
         }
 
+        @Override
         public void permits(ConstraintsParameters cp)
                 throws CertPathValidatorException {
             for (String usage : usages) {
@@ -746,6 +796,7 @@
          * constraint  Any permitted constraint will exit the linked list
          * to allow the operation.
          */
+        @Override
         public void permits(ConstraintsParameters cp)
                 throws CertPathValidatorException {
             Key key = null;
@@ -769,6 +820,7 @@
 
         // Check if key constraint disable the specified key
         // Uses old style permit()
+        @Override
         public boolean permits(Key key) {
             // If we recursively find a constraint that permits us to use
             // this key, return true and skip any other constraint checks.
@@ -782,6 +834,30 @@
             return permitsImpl(key);
         }
 
+        @Override
+        public boolean permits(AlgorithmParameters parameters) {
+            String paramAlg = parameters.getAlgorithm();
+            if (!algorithm.equalsIgnoreCase(parameters.getAlgorithm())) {
+                // Consider the impact of the algorithm aliases.
+                Collection<String> aliases =
+                        AlgorithmDecomposer.getAliases(algorithm);
+                if (!aliases.contains(paramAlg)) {
+                    return true;
+                }
+            }
+
+            int keySize = KeyUtil.getKeySize(parameters);
+            if (keySize == 0) {
+                return false;
+            } else if (keySize > 0) {
+                return !((keySize < minSize) || (keySize > maxSize) ||
+                    (prohibitedSize == keySize));
+            }   // Otherwise, the key size is not accessible or determined.
+                // Conservatively, please don't disable such keys.
+
+            return true;
+        }
+
         private boolean permitsImpl(Key key) {
             // Verify this constraint is for this public key algorithm
             if (algorithm.compareToIgnoreCase(key.getAlgorithm()) != 0) {
@@ -809,6 +885,7 @@
             algorithm = algo;
         }
 
+        @Override
         public void permits(ConstraintsParameters cp)
                 throws CertPathValidatorException {
             throw new CertPathValidatorException(
@@ -817,6 +894,7 @@
                     null, null, -1, BasicReason.ALGORITHM_CONSTRAINED);
         }
 
+        @Override
         public boolean permits(Key key) {
             return false;
         }
--- a/jdk/src/java.base/share/classes/sun/security/util/KeyUtil.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/KeyUtil.java	Wed Jul 05 23:36:51 2017 +0200
@@ -25,6 +25,7 @@
 
 package sun.security.util;
 
+import java.security.AlgorithmParameters;
 import java.security.Key;
 import java.security.PrivilegedAction;
 import java.security.AccessController;
@@ -35,6 +36,8 @@
 import java.security.interfaces.DSAParams;
 import java.security.SecureRandom;
 import java.security.spec.KeySpec;
+import java.security.spec.ECParameterSpec;
+import java.security.spec.InvalidParameterSpecException;
 import javax.crypto.SecretKey;
 import javax.crypto.interfaces.DHKey;
 import javax.crypto.interfaces.DHPublicKey;
@@ -100,6 +103,61 @@
     }
 
     /**
+     * Returns the key size of the given cryptographic parameters in bits.
+     *
+     * @param parameters the cryptographic parameters, cannot be null
+     * @return the key size of the given cryptographic parameters in bits,
+     *       or -1 if the key size is not accessible
+     */
+    public static final int getKeySize(AlgorithmParameters parameters) {
+
+        String algorithm = parameters.getAlgorithm();
+        switch (algorithm) {
+            case "EC":
+                try {
+                    ECKeySizeParameterSpec ps = parameters.getParameterSpec(
+                            ECKeySizeParameterSpec.class);
+                    if (ps != null) {
+                        return ps.getKeySize();
+                    }
+                } catch (InvalidParameterSpecException ipse) {
+                    // ignore
+                }
+
+                try {
+                    ECParameterSpec ps = parameters.getParameterSpec(
+                            ECParameterSpec.class);
+                    if (ps != null) {
+                        return ps.getOrder().bitLength();
+                    }
+                } catch (InvalidParameterSpecException ipse) {
+                    // ignore
+                }
+
+                // Note: the ECGenParameterSpec case should be covered by the
+                // ECParameterSpec case above.
+                // See ECUtil.getECParameterSpec(Provider, String).
+
+                break;
+            case "DiffieHellman":
+                try {
+                    DHParameterSpec ps = parameters.getParameterSpec(
+                            DHParameterSpec.class);
+                    if (ps != null) {
+                        return ps.getP().bitLength();
+                    }
+                } catch (InvalidParameterSpecException ipse) {
+                    // ignore
+                }
+                break;
+
+            // May support more AlgorithmParameters algorithms in the future.
+        }
+
+        return -1;
+    }
+
+    /**
      * Returns whether the key is valid or not.
      * <P>
      * Note that this method is only apply to DHPublicKey at present.
--- a/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/Resources_sv.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,9 +53,9 @@
                 "CredOwner:\n\tIdentitetshavareklass = {0}\n\tIdentitetshavarenamn = {1}"},
 
         // javax.security.auth.x500
-        {"provided.null.name", "angav null-namn"},
-        {"provided.null.keyword.map", "nullnyckelordsmappning tillhandah\u00F6lls"},
-        {"provided.null.OID.map", "null-OID-mappning tillhandah\u00F6lls"},
+        {"provided.null.name", "null-namn angavs"},
+        {"provided.null.keyword.map", "nullnyckelordsmappning angavs"},
+        {"provided.null.OID.map", "null-OID-mappning angavs"},
 
         // javax.security.auth.Subject
         {"NEWLINE", "\n"},
@@ -63,7 +63,7 @@
                 "ogiltigt null-AccessControlContext"},
         {"invalid.null.action.provided", "ogiltig null-funktion"},
         {"invalid.null.Class.provided", "ogiltig null-klass"},
-        {"Subject.", "Innehavare:\n"},
+        {"Subject.", "Subjekt:\n"},
         {".Principal.", "\tIdentitetshavare: "},
         {".Public.Credential.", "\tOffentlig inloggning: "},
         {".Private.Credentials.inaccessible.",
@@ -71,9 +71,9 @@
         {".Private.Credential.", "\tPrivat inloggning: "},
         {".Private.Credential.inaccessible.",
                 "\tPrivat inloggning \u00E4r inte tillg\u00E4nglig\n"},
-        {"Subject.is.read.only", "Innehavare \u00E4r skrivskyddad"},
+        {"Subject.is.read.only", "Subjektet \u00E4r skrivskyddad"},
         {"attempting.to.add.an.object.which.is.not.an.instance.of.java.security.Principal.to.a.Subject.s.Principal.Set",
-                "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en f\u00F6rekomst av java.security.Principal till en upps\u00E4ttning av identitetshavare"},
+                "f\u00F6rs\u00F6k att l\u00E4gga till ett objekt som inte \u00E4r en instans av java.security.Principal till ett subjekts upps\u00E4ttning av identitetshavare"},
         {"attempting.to.add.an.object.which.is.not.an.instance.of.class",
                 "f\u00F6rs\u00F6ker l\u00E4gga till ett objekt som inte \u00E4r en instans av {0}"},
 
@@ -84,11 +84,11 @@
         {"Invalid.null.input.name", "Ogiltiga null-indata: namn"},
         {"No.LoginModules.configured.for.name",
          "Inga inloggningsmoduler har konfigurerats f\u00F6r {0}"},
-        {"invalid.null.Subject.provided", "ogiltig null-innehavare"},
+        {"invalid.null.Subject.provided", "ogiltig null-subjekt"},
         {"invalid.null.CallbackHandler.provided",
                 "ogiltig null-CallbackHandler"},
         {"null.subject.logout.called.before.login",
-                "null-innehavare - utloggning anropades f\u00F6re inloggning"},
+                "null-subjekt - utloggning anropades f\u00F6re inloggning"},
         {"unable.to.instantiate.LoginModule.module.because.it.does.not.provide.a.no.argument.constructor",
                 "kan inte instansiera LoginModule, {0}, eftersom den inte tillhandah\u00E5ller n\u00E5gon icke-argumentskonstruktor"},
         {"unable.to.instantiate.LoginModule",
@@ -148,12 +148,12 @@
 
         // sun.security.pkcs11.SunPKCS11
         {"PKCS11.Token.providerName.Password.",
-                "PKCS11-tecken [{0}] L\u00F6senord: "},
+                "L\u00F6senord f\u00F6r PKCS11-token [{0}]: "},
 
         /* --- DEPRECATED --- */
         // javax.security.auth.Policy
         {"unable.to.instantiate.Subject.based.policy",
-                "den innehavarbaserade policyn kan inte skapas"}
+                "kan inte instansiera subjektbaserad policy"}
     };
 
 
--- a/jdk/src/java.base/share/classes/sun/util/calendar/AbstractCalendar.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.base/share/classes/sun/util/calendar/AbstractCalendar.java	Wed Jul 05 23:36:51 2017 +0200
@@ -63,9 +63,9 @@
 
     public Era getEra(String eraName) {
         if (eras != null) {
-            for (int i = 0; i < eras.length; i++) {
-                if (eras[i].equals(eraName)) {
-                    return eras[i];
+            for (Era era : eras) {
+                if (era.getName().equals(eraName)) {
+                    return era;
                 }
             }
         }
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Jul 05 23:36:51 2017 +0200
@@ -274,13 +274,18 @@
         }
         AtomicLong ref = new AtomicLong();
         contentView.execute(viewPtr -> {
+            boolean hasOwnerPtr = false;
+
             if (owner != null) {
-                owner.execute(ownerPtr -> {
+                hasOwnerPtr = 0L != owner.executeGet(ownerPtr -> {
                     ref.set(nativeCreateNSWindow(viewPtr, ownerPtr, styleBits,
-                                                 bounds.x, bounds.y,
-                                                 bounds.width, bounds.height));
+                                                    bounds.x, bounds.y,
+                                                    bounds.width, bounds.height));
+                    return 1;
                 });
-            } else {
+            }
+
+            if (!hasOwnerPtr) {
                 ref.set(nativeCreateNSWindow(viewPtr, 0,
                                              styleBits, bounds.x, bounds.y,
                                              bounds.width, bounds.height));
--- a/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -93,7 +93,7 @@
 resizable=storleks\u00E4ndringsbar
 selectable=valbar
 selected=vald
-showing=visas
+showing=visar
 singleline=en rad
 transient=tillf\u00E4llig
 visible=synlig
--- a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1110,6 +1110,8 @@
      *
      * Event source can be changed during processing, but in some cases
      * we need to be able to obtain original source.
+     *
+     * @since 1.8
      */
     private Component originalSource;
 
--- a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java	Wed Jul 05 23:36:51 2017 +0200
@@ -27,6 +27,8 @@
 
 import java.awt.color.ColorSpace;
 import java.awt.geom.Rectangle2D;
+import java.awt.AlphaComposite;
+import java.awt.Graphics2D;
 import java.awt.Rectangle;
 import java.awt.geom.Point2D;
 import java.awt.RenderingHints;
@@ -193,9 +195,10 @@
                                           int   nBands,
                                           int   nElems) {
 
-        byte[][]        lutData = new byte[scale.length][nElems];
+        byte[][]        lutData = new byte[nBands][nElems];
+        int band;
 
-        for (int band=0; band<scale.length; band++) {
+        for (band=0; band<scale.length; band++) {
             float  bandScale   = scale[band];
             float  bandOff     = off[band];
             byte[] bandLutData = lutData[band];
@@ -212,6 +215,17 @@
             }
 
         }
+        int maxToCopy = (nBands == 4 && scale.length == 4) ? 4 : 3;
+        while (band < lutData.length && band < maxToCopy) {
+           System.arraycopy(lutData[band-1], 0, lutData[band], 0, nElems);
+           band++;
+        }
+        if (nBands == 4 && band < nBands) {
+           byte[] bandLutData = lutData[band];
+           for (int i=0; i<nElems; i++) {
+              bandLutData[i] = (byte)i;
+           }
+        }
 
         return new ByteLookupTable(0, lutData);
     }
@@ -228,9 +242,10 @@
                                             int   nBands,
                                             int   nElems) {
 
-        short[][]        lutData = new short[scale.length][nElems];
+        short[][]        lutData = new short[nBands][nElems];
+        int band = 0;
 
-        for (int band=0; band<scale.length; band++) {
+        for (band=0; band<scale.length; band++) {
             float   bandScale   = scale[band];
             float   bandOff     = off[band];
             short[] bandLutData = lutData[band];
@@ -246,6 +261,17 @@
                 bandLutData[i] = (short)val;
             }
         }
+        int maxToCopy = (nBands == 4 && scale.length == 4) ? 4 : 3;
+        while (band < lutData.length && band < maxToCopy) {
+           System.arraycopy(lutData[band-1], 0, lutData[band], 0, nElems);
+           band++;
+        }
+        if (nBands == 4 && band < nBands) {
+           short[] bandLutData = lutData[band];
+           for (int i=0; i<nElems; i++) {
+              bandLutData[i] = (short)i;
+           }
+        }
 
         return new ShortLookupTable(0, lutData);
     }
@@ -300,6 +326,19 @@
             }
         }
 
+      if (dstSM instanceof ComponentSampleModel) {
+           ComponentSampleModel dsm = (ComponentSampleModel)dstSM;
+           if (dsm.getPixelStride() != dst.getNumBands()) {
+               return false;
+           }
+        }
+        if (srcSM instanceof ComponentSampleModel) {
+           ComponentSampleModel csm = (ComponentSampleModel)srcSM;
+           if (csm.getPixelStride() != src.getNumBands()) {
+               return false;
+           }
+        }
+
         return true;
     }
 
@@ -344,6 +383,7 @@
         }
 
         boolean needToConvert = false;
+        boolean needToDraw = false;
 
         // Include alpha
         if (scaleConst > numSrcColorComp && srcCM.hasAlpha()) {
@@ -374,102 +414,41 @@
 
             dstCM = dst.getColorModel();
             if(srcCM.getColorSpace().getType() !=
-               dstCM.getColorSpace().getType()) {
+                 dstCM.getColorSpace().getType()) {
                 needToConvert = true;
                 dst = createCompatibleDestImage(src, null);
             }
 
         }
 
-        boolean scaleAlpha = true;
-
-        //
-        // The number of sets of scaling constants may be one,
-        // in which case the same constants are applied to all color
-        // (but NOT alpha) components. Otherwise, the number of sets
-        // of scaling constants may equal the number of Source color
-        // components, in which case NO rescaling of the alpha component
-        // (if present) is performed.
-        //
-        if (numSrcColorComp == scaleConst || scaleConst == 1) {
-            scaleAlpha = false;
-        }
-
         //
         // Try to use a native BI rescale operation first
         //
         if (ImagingLib.filter(this, src, dst) == null) {
+            if (src.getRaster().getNumBands() !=
+                dst.getRaster().getNumBands()) {
+                needToDraw = true;
+                dst = createCompatibleDestImage(src, null);
+            }
+
             //
             // Native BI rescale failed - convert to rasters
             //
             WritableRaster srcRaster = src.getRaster();
             WritableRaster dstRaster = dst.getRaster();
 
-            if (!scaleAlpha) {
-                if (srcCM.hasAlpha()) {
-                    // Do not rescale Alpha component
-                    int minx = srcRaster.getMinX();
-                    int miny = srcRaster.getMinY();
-                    int[] bands = new int[numSrcColorComp];
-                    for (int i=0; i < numSrcColorComp; i++) {
-                        bands[i] = i;
-                    }
-                    srcRaster =
-                        srcRaster.createWritableChild(minx, miny,
-                                                      srcRaster.getWidth(),
-                                                      srcRaster.getHeight(),
-                                                      minx, miny,
-                                                      bands);
-                }
-                if (dstCM.hasAlpha()) {
-                    int minx = dstRaster.getMinX();
-                    int miny = dstRaster.getMinY();
-                    int[] bands = new int[numSrcColorComp];
-                    for (int i=0; i < numSrcColorComp; i++) {
-                        bands[i] = i;
-                    }
-                    dstRaster =
-                        dstRaster.createWritableChild(minx, miny,
-                                                      dstRaster.getWidth(),
-                                                      dstRaster.getHeight(),
-                                                      minx, miny,
-                                                      bands);
-                }
-            }
-
             //
             // Call the raster filter method
             //
-            filterRasterImpl(srcRaster, dstRaster, scaleConst);
-
-            //
-            // here copy the unscaled src alpha to destination alpha channel
-            //
-            if (!scaleAlpha) {
-                Raster srcAlphaRaster = null;
-                WritableRaster dstAlphaRaster = null;
-
-                if (srcCM.hasAlpha()) {
-                    srcAlphaRaster = src.getAlphaRaster();
-                }
-                if (dstCM.hasAlpha()) {
-                    dstAlphaRaster = dst.getAlphaRaster();
-                    if (srcAlphaRaster != null) {
-                        dstAlphaRaster.setRect(srcAlphaRaster);
-                    } else {
-                        int alpha = 0xff << 24;
-                        for (int cy=0; cy < dst.getHeight(); cy++) {
-                            for (int cx=0; cx < dst.getWidth(); cx++) {
-                                int color = dst.getRGB(cx, cy);
-
-                                dst.setRGB(cx, cy, color | alpha);
-                            }
-                        }
-                    }
-                }
-            }
+            filterRasterImpl(srcRaster, dstRaster, scaleConst, false);
         }
 
+        if (needToDraw) {
+             Graphics2D g = origDst.createGraphics();
+             g.setComposite(AlphaComposite.Src);
+             g.drawImage(dst, 0, 0, width, height, null);
+             g.dispose();
+        }
         if (needToConvert) {
             // ColorModels are not the same
             ColorConvertOp ccop = new ColorConvertOp(hints);
@@ -497,10 +476,11 @@
      *         stated in the class comments.
      */
     public final WritableRaster filter (Raster src, WritableRaster dst)  {
-        return filterRasterImpl(src, dst, length);
+        return filterRasterImpl(src, dst, length, true);
     }
 
-    private WritableRaster filterRasterImpl(Raster src, WritableRaster dst, int scaleConst) {
+    private WritableRaster filterRasterImpl(Raster src, WritableRaster dst,
+                                            int scaleConst, boolean sCheck) {
         int numBands = src.getNumBands();
         int width  = src.getWidth();
         int height = src.getHeight();
@@ -527,7 +507,7 @@
 
         // Make sure that the arrays match
         // Make sure that the low/high/constant arrays match
-        if (scaleConst != 1 && scaleConst != src.getNumBands()) {
+        if (sCheck && scaleConst != 1 && scaleConst != src.getNumBands()) {
             throw new IllegalArgumentException("Number of scaling constants "+
                                                "does not equal the number of"+
                                                " of bands in the src raster");
@@ -598,8 +578,14 @@
                     srcPix = src.getPixel(sX, sY, srcPix);
                     tidx = 0;
                     for (int z=0; z<numBands; z++, tidx += step) {
-                        val = (int)(srcPix[z]*scaleFactors[tidx]
-                                          + offsets[tidx]);
+                        if ((scaleConst == 1 || scaleConst == 3) &&
+                            (z == 3) && (numBands == 4)) {
+                           val = srcPix[z];
+                        } else {
+                            val = (int)(srcPix[z]*scaleFactors[tidx]
+                                              + offsets[tidx]);
+
+                        }
                         // Clamp
                         if ((val & dstMask[z]) != 0) {
                             if (val < 0) {
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -138,7 +138,7 @@
             {"appletpanel.fileexception", "\uB85C\uB4DC \uC911 {0} \uC608\uC678\uC0AC\uD56D \uBC1C\uC0DD: {1}"},
             {"appletpanel.filedeath", "\uB85C\uB4DC \uC911 {0}\uC774(\uAC00) \uC885\uB8CC\uB428: {1}"},
             {"appletpanel.fileerror", "\uB85C\uB4DC \uC911 {0} \uC624\uB958 \uBC1C\uC0DD: {1}"},
-            {"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38 \uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+            {"appletpanel.badattribute.exception", "HTML \uAD6C\uBB38\uBD84\uC11D \uC911: width/height \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
             {"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream\uC5D0 \uB110\uC774 \uC544\uB2CC \uB85C\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4."},
             {"appletprops.title", "AppletViewer \uC18D\uC131"},
             {"appletprops.label.http.server", "HTTP \uD504\uB85D\uC2DC \uC11C\uBC84:"},
--- a/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/resources/awt_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -71,7 +71,7 @@
 AWT.f22=F22
 AWT.f23=F23
 AWT.f24=F24
-AWT.printScreen=Print Screen
+AWT.printScreen=Sk\u00E4rmutskrift
 AWT.insert=Insert
 AWT.help=Hj\u00E4lp
 AWT.windows=Windows
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Wed Jul 05 23:36:51 2017 +0200
@@ -589,6 +589,9 @@
                 Component client = getClientComponent();
 
                 if (client != null) {
+                    if (!client.isShowing()) {
+                        return;
+                    }
                     if (haveActiveClient()) {
                             Rectangle rc = inputContext.getTextLocation(TextHitInfo.leading(0));
                             x = rc.x;
--- a/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -205,14 +205,19 @@
 static jstring jstringFromSTRRET(JNIEnv* env, LPITEMIDLIST pidl, STRRET* pStrret) {
     switch (pStrret->uType) {
         case STRRET_CSTR :
-            return JNU_NewStringPlatform(env, reinterpret_cast<const char*>(pStrret->cStr));
+            if (pStrret->cStr != NULL) {
+                return JNU_NewStringPlatform(env, reinterpret_cast<const char*>(pStrret->cStr));
+            }
+            break;
         case STRRET_OFFSET :
             // Note : this may need to be WCHAR instead
             return JNU_NewStringPlatform(env,
                                          (CHAR*)pidl + pStrret->uOffset);
         case STRRET_WSTR :
-            return env->NewString(reinterpret_cast<const jchar*>(pStrret->pOleStr),
-                static_cast<jsize>(wcslen(pStrret->pOleStr)));
+            if (pStrret->pOleStr != NULL) {
+                return env->NewString(reinterpret_cast<const jchar*>(pStrret->pOleStr),
+                    static_cast<jsize>(wcslen(pStrret->pOleStr)));
+            }
     }
     return NULL;
 }
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3811,6 +3811,9 @@
     UINT bits = 1;
     POINT p = {0, 0}; // upper left corner of the client area
     HWND hWnd = GetHWnd();
+    if (!::IsWindowVisible(hWnd)) {
+        return;
+    }
     HWND hTop = GetTopLevelParentForWindow(hWnd);
     ::ClientToScreen(hTop, &p);
     if (!m_bitsCandType) {
@@ -4083,6 +4086,9 @@
 //
 void AwtComponent::InquireCandidatePosition()
 {
+    if (!::IsWindowVisible(GetHWnd())) {
+        return;
+    }
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 
     // get global reference of WInputMethod class (run only once)
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/tcp/TCPChannel.java	Wed Jul 05 23:36:51 2017 +0200
@@ -296,11 +296,15 @@
                     out.flush();
                 }
             } catch (IOException e) {
-                if (e instanceof RemoteException)
+                try {
+                    conn.close();
+                } catch (Exception ex) {}
+                if (e instanceof RemoteException) {
                     throw (RemoteException) e;
-                else
+                } else {
                     throw new ConnectIOException(
                         "error during JRMP connection establishment", e);
+                }
             }
         } else {
             try {
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -140,7 +140,7 @@
 #WebRowSetXmlReader exception
 wrsxmlreader.invalidcp = RowSet\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. \uCEE4\uC11C \uC704\uCE58\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
 wrsxmlreader.readxml = readXML: {0}
-wrsxmlreader.parseerr = ** \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0}, \uD589: {1}, URI: {2}
+wrsxmlreader.parseerr = ** \uAD6C\uBB38\uBD84\uC11D \uC624\uB958: {0}, \uD589: {1}, URI: {2}
 
 #WebRowSetXmlWriter exceptions
 wrsxmlwriter.ioex = IOException : {0}
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,7 @@
 cachedrowsetimpl.longfail = getLong utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
 cachedrowsetimpl.floatfail = getFloat utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
 cachedrowsetimpl.doublefail = getDouble utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}
-cachedrowsetimpl.dtypemismt = Inkompatibel datatyp 
+cachedrowsetimpl.dtypemismt = Felmatchad datatyp 
 cachedrowsetimpl.datefail = getDate utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}, ingen konvertering tillg\u00E4nglig
 cachedrowsetimpl.timefail = getTime utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}, ingen konvertering tillg\u00E4nglig
 cachedrowsetimpl.posupdate = Det finns inte st\u00F6d f\u00F6r positionerad uppdatering
--- a/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3199,22 +3199,10 @@
     //------------------------- JDBC 4.0 -----------------------------------
 
     /**
-     * Indicates whether or not this data source supports the SQL <code>ROWID</code> type,
-     * and if so  the lifetime for which a <code>RowId</code> object remains valid.
-     * <p>
-     * The returned int values have the following relationship:
-     * <pre>{@code
-     *     ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION
-     *         < ROWID_VALID_SESSION < ROWID_VALID_FOREVER
-     * }</pre>
-     * so conditional logic such as
-     * <pre>{@code
-     *     if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)
-     * }</pre>
-     * can be used. Valid Forever means valid across all Sessions, and valid for
-     * a Session means valid across all its contained Transactions.
+     * Indicates whether this data source supports the SQL {@code  ROWID} type,
+     * and the lifetime for which a {@link  RowId} object remains valid.
      *
-     * @return the status indicating the lifetime of a <code>RowId</code>
+     * @return the status indicating the lifetime of a {@code  RowId}
      * @throws SQLException if a database access error occurs
      * @since 1.6
      */
--- a/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java	Wed Jul 05 23:36:51 2017 +0200
@@ -702,7 +702,7 @@
             }
 
             if (false == bExtendedSearch) {
-                debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm.  role = " + role.toDisplayString (Locale.US) );
+                debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm.  role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") );
                 /*
                 Step 3:
                 =======
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=Unbekannte Option: {0}
 error.missing.arg=F\u00FCr die Option {0} ist ein Argument erforderlich
 error.bad.file.arg=Fehler beim Parsen der Dateiargumente
-error.bad.option=Eine der Optionen -{ctxu} muss angegeben werden.
+error.bad.option=Eine der Optionen -{ctxuid} muss angegeben werden.
 error.bad.cflag=Kennzeichen "c" erfordert Angabe von Manifest oder Eingabedateien.
 error.bad.uflag=Kennzeichen "u" erfordert Angabe von Manifest, Kennzeichen "e" oder Eingabedateien.
 error.bad.eflag=Kennzeichen "e" und Manifest mit dem Attribut "Main-Class" k\u00F6nnen nicht zusammen angegeben\nwerden.
-error.bad.dflag=F\u00FCr die Option "-d, --print-module-descriptor" muss bzw. m\u00FCssen keine Eingabedatei(en) angegeben werden: {0}
+error.bad.dflag=F\u00FCr die Option "-d, --describe-module" m\u00FCssen keine Eingabedateien angegeben werden
 error.bad.reason=Schlechter Grund: {0}, Grund muss entweder "deprecated", "deprecated-for-removal" oder "incubating" sein
 error.nosuch.fileordir={0}: Datei oder Verzeichnis nicht vorhanden
 error.write.file=Fehler beim Schreiben in vorhandener JAR-Datei
@@ -42,16 +42,11 @@
 error.create.tempfile=Es konnte keine tempor\u00E4re Datei erstellt werden
 error.hash.dep=Abh\u00E4ngigkeiten bei Hashing-Modul {0}. Modul {1} kann nicht im Modulpfad gefunden werden
 error.module.options.without.info=--module-version oder --hash-modules ohne module-info.class
+error.no.operative.descriptor=Kein operativer Deskriptor f\u00FCr Release: {0}
+error.no.root.descriptor=Kein Root-Moduldeskriptor. Geben Sie "--release" an
+error.unable.derive.automodule=Moduldeskriptor kann nicht abgeleitet werden f\u00FCr: {0}
 error.unexpected.module-info=Unerwarteter Moduldeskriptor {0}
 error.module.descriptor.not.found=Moduldeskriptor nicht gefunden
-error.validator.info.without.root=module-info.class in einem versionierten Verzeichnis gefunden, in der Root ist module-info.class jedoch nicht vorhanden
-error.validator.info.name.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt falschen Namen
-error.validator.info.requires.transitive=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires transitive"
-error.validator.info.requires.added=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires"
-error.validator.info.requires.dropped=module-info.class in einem versionierten Verzeichnis enth\u00E4lt fehlenden "requires"
-error.validator.info.exports.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "exports"
-error.validator.info.opens.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "opens"
-error.validator.info.provides.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "provides"
 error.invalid.versioned.module.attribute=Ung\u00FCltiges Moduldeskriptorattribut {0}
 error.missing.provider=Serviceprovider nicht gefunden: {0}
 error.release.value.notnumber=Release {0} nicht g\u00FCltig
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=Eintrag {0} weist eine Klassenversion auf, die mit einer fr\u00FCheren Version inkompatibel ist
 error.validator.different.api=Eintrag {0} enth\u00E4lt eine Klasse mit einer anderen API als in der fr\u00FCheren Version
 error.validator.names.mismatch=Eintrag {0} enth\u00E4lt eine Klasse mit dem internen Namen {1}, Namen stimmen nicht \u00FCberein
+error.validator.info.name.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt falschen Namen
+error.validator.info.requires.transitive=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires transitive"
+error.validator.info.requires.added=module-info.class in einem versionierten Verzeichnis enth\u00E4lt zus\u00E4tzlichen "requires"
+error.validator.info.requires.dropped=module-info.class in einem versionierten Verzeichnis enth\u00E4lt fehlenden "requires"
+error.validator.info.exports.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "exports"
+error.validator.info.opens.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "opens"
+error.validator.info.provides.notequal=module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedliche "provides"
+error.validator.info.version.notequal={0}: module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedlichen "version"-Wert
+error.validator.info.manclass.notequal={0}: module-info.class in einem versionierten Verzeichnis enth\u00E4lt unterschiedlichen "main-class"-Wert
 warn.validator.identical.entry=Warnung: Eintrag {0} enth\u00E4lt eine Klasse, die mit\neinem bereits in der JAR-Datei enthaltenen Eintrag identisch ist
 warn.validator.resources.with.same.name=Warnung: Eintrag {0}, mehrere Ressourcen mit demselben Namen
 warn.validator.concealed.public.class=Warnung: Eintrag {0} ist eine \u00F6ffentliche Klasse\nin einem verdeckten Package. Wenn Sie diese JAR-Datei in den Classpath einf\u00FCgen, kommt es\nzu nicht kompatiblen \u00F6ffentlichen Schnittstellen
+warn.release.unexpected.versioned.entry=Unerwarteter versionierter Eintrag {0}
 out.added.manifest=Manifest wurde hinzugef\u00FCgt
 out.added.module-info=module-info hinzugef\u00FCgt: {0}
+out.automodule=Kein Moduldeskriptor gefunden. Automatisches Modul wurde abgeleitet.
 out.update.manifest=Manifest wurde aktualisiert
 out.update.module-info=module-info aktualisiert: {0}
 out.ignore.entry=Eintrag {0} wird ignoriert
@@ -88,17 +94,19 @@
 main.usage.summary=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] Dateien] ...
 main.usage.summary.try=Verwenden Sie "jar --help", um weitere Informationen anzuzeigen.
 
-main.help.preopt=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] Dateien] ...\njar erstellt ein Archiv f\u00FCr Klassen und Ressourcen und kann individuelle\nKlassen oder Ressourcen aus einem Archiv bearbeiten oder wiederherstellen.\n\n Beispiele:\n # Ein Archiv namens classes.jar mit zwei Klassendateien erstellen:\n jar --create --file classes.jar Foo.class Bar.class\n # Ein Archiv mit einem vorhandenen Manifest mit allen Dateien in foo/ erstellen:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Ein modulares JAR-Archiv erstellen, dessen Moduldeskriptor sich in\n # classes/module-info.class befindet:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Ein vorhandenes nicht modulares JAR-Archiv in ein modulares JAR-Archiv aktualisieren:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Multi-Release-JAR-Datei erstellen, wobei einige Dateien in das Verzeichnis META-INF/versions/9 gespeichert werden:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Verwendung: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar erstellt ein Archiv f\u00FCr Klassen und Ressourcen und kann individuelle\nKlassen oder Ressourcen aus einem Archiv bearbeiten oder wiederherstellen.\n\n Beispiele:\n # Ein Archiv namens classes.jar mit zwei Klassendateien erstellen:\n jar --create --file classes.jar Foo.class Bar.class\n # Ein Archiv mit einem vorhandenen Manifest mit allen Dateien in foo/ erstellen:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Ein modulares JAR-Archiv erstellen, dessen Moduldeskriptor sich in\n # classes/module-info.class befindet:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Ein vorhandenes nicht modulares JAR-Archiv in ein modulares JAR-Archiv aktualisieren:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Multi-Release-JAR-Datei erstellen, wobei einige Dateien im Verzeichnis META-INF/versions/9 gespeichert werden:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nUm den "jar"-Befehl zu k\u00FCrzen oder zu vereinfachen, k\u00F6nnen Sie Argumente in einer separaten\nTextdatei angeben und diese mit dem @-Zeichen als Pr\u00E4fix an den "jar"-Befehl \u00FCbergeben.\n\n Beispiele:\n # Zus\u00E4tzliche Optionen und Liste der Klassendateien aus der Datei classes.list lesen\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ Hauptvorgangsmodus:\n
 main.help.opt.main.create=\  -c, --create               Archiv erstellen
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  Indexinformationen f\u00FCr die angegebenen JAR-\n                             Archive generieren
 main.help.opt.main.list=\  -t, --list                 Das Inhaltsverzeichnis f\u00FCr das Archiv auflisten
 main.help.opt.main.update=\  -u, --update               Ein vorhandenes JAR-Archiv aktualisieren
 main.help.opt.main.extract=\  -x, --extract              Benannte (oder alle) Dateien aus dem Archiv extrahieren
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  Moduldeskriptor drucken
+main.help.opt.main.describe-module=\  -d, --describe-module      Gibt den Moduldeskriptor oder automatischen Modulnamen aus
 main.help.opt.any=\ In jedem Modus g\u00FCltige Vorgangsmodifikatoren:\n\n  -C DIR                     Zum angegebenen Verzeichnis wechseln und die folgende\n                             Datei aufnehmen
-main.help.opt.any.file=-f, --file=FILE            Der Name der Archivdatei\n      --release VERSION      Die folgenden Dateien werden in ein versioniertes Verzeichnis\n                             der JAR-Datei gespeichert (d.h. META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            Der Name der Archivdatei. Wenn Sie dies lauslassen, wird entweder stdin oder\n                             stdout verwendet, je nach Vorgang\n      --release VERSION      Speichert alle der folgenden Dateien in einem versionierten Verzeichnis\n                             der JAR-Datei (d.h. META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              Verbose-Ausgabe bei Standardausgabe generieren
+main.help.opt.create=\ Vorgangsmodifikatoren, die nur im Erstellungsmodus g\u00FCltig sind:\n
+main.help.opt.create.normalize=\  -n, --normalize            Normalisiert Informationen im neuen JAR-Archiv\n                             nach der Erstellung
 main.help.opt.create.update=\ Vorgangsmodifikatoren, die nur im Erstellungs- und Aktualisierungsmodus g\u00FCltig sind:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME Der Anwendungseinstiegspunkt f\u00FCr Standalone-\n                             Anwendungen, die in einem modularen oder ausf\u00FChrbaren\n                             JAR-Archiv geb\u00FCndelt sind
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Die Manifestinformationen aus der angegebenen\n                             Manifestdatei aufnehmen
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ Vorgangsmodifikatoren, die nur im Erstellungs-, Aktualisierungs- und Indexgenerierungsmodus g\u00FCltig sind:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Nur speichern, keine ZIP-Komprimierung verwenden
 main.help.opt.other=\ Weitere Optionen:\n
-main.help.opt.other.help=\  -?, --help[:compat]        Diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe angeben
+main.help.opt.other.help=\  -h, --help[:compat]        Gibt diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe an
 main.help.opt.other.help-extra=\      --help-extra           Hilfe zu zus\u00E4tzlichen Optionen
 main.help.opt.other.version=\      --version              Programmversion ausgeben
 main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorg\u00E4nge sind nur g\u00FCltig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-modules" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch f\u00FCr die jeweils\n zugeh\u00F6rigen kurzen Optionen obligatorisch oder optional.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=opci\u00F3n no reconocida: {0}
 error.missing.arg=la opci\u00F3n {0} necesita un argumento
 error.bad.file.arg=Error al analizar los argumentos de archivo
-error.bad.option=Se debe especificar una de las opciones -{ctxu}.
+error.bad.option=Se debe especificar una de las opciones -{ctxuid}.
 error.bad.cflag=El indicador 'c' necesita la especificaci\u00F3n de archivos de manifiesto o de entrada.
 error.bad.uflag=El indicador 'u' necesita la especificaci\u00F3n de archivos de manifiesto, de entrada o indicador 'e'.
 error.bad.eflag=El indicador 'e' y el manifiesto con el atributo 'Main-Class' no pueden especificarse \na la vez.
-error.bad.dflag=La opci\u00F3n ''-d, --print-module-descriptor'' no requiere especificar archivos de entrada: {0}
+error.bad.dflag=La opci\u00F3n '-d, --describe-module'  no requiere especificar archivos de entrada
 error.bad.reason=Motivo err\u00F3neo: {0}, debe ser anticuado, anticuado para eliminaci\u00F3n o incubando
 error.nosuch.fileordir={0} : no existe tal archivo o directorio
 error.write.file=Error al escribir un archivo jar existente
@@ -42,16 +42,11 @@
 error.create.tempfile=No se ha podido crear el archivo temporal
 error.hash.dep=Aplicando hash a las dependencias del m\u00F3dulo {0}, no se ha encontrado el m\u00F3dulo {1} en la ruta del m\u00F3dulo
 error.module.options.without.info=Uno de --module-version o -hash-modules sin module-info.class
+error.no.operative.descriptor=No hay ning\u00FAn descriptor operativo para la versi\u00F3n: {0}
+error.no.root.descriptor=No hay ning\u00FAn descriptor de m\u00F3dulo de ra\u00EDz, especifique --release
+error.unable.derive.automodule=No se ha podido derivar el descriptor de m\u00F3dulo para: {0}
 error.unexpected.module-info=Descriptor de m\u00F3dulo inesperado {0}
 error.module.descriptor.not.found=No se ha encontrado el descriptor de m\u00F3dulo
-error.validator.info.without.root=Se ha encontrado module-info.class en un directorio con versi\u00F3n sin module-info.class en la ra\u00EDz
-error.validator.info.name.notequal=module-info.class en un directorio con versi\u00F3n contiene un nombre incorrecto
-error.validator.info.requires.transitive=module-info.class en un directorio con versiones contiene "requisitos transitivos" adicionales
-error.validator.info.requires.added=module-info.class en un directorio con versi\u00F3n contiene "requires" adicionales
-error.validator.info.requires.dropped=module-info.class en un directorio con versiones contiene "requires" que faltan
-error.validator.info.exports.notequal=module-info.class en un directorio con versiones contiene "exports" diferentes
-error.validator.info.opens.notequal=module-info.class en un directorio con versiones contiene "aportaciones" diferentes
-error.validator.info.provides.notequal=module-info.class en un directorio con versiones contiene "provides" diferentes
 error.invalid.versioned.module.attribute=Atributo de descriptor de m\u00F3dulo no v\u00E1lido {0}
 error.missing.provider=No se ha encontrado el proveedor de servicios: {0}
 error.release.value.notnumber=versi\u00F3n {0} no v\u00E1lida
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=la entrada {0} tiene una versi\u00F3n de clase no compatible con una versi\u00F3n anterior
 error.validator.different.api=la entrada {0} contiene una clase con una api diferente de la versi\u00F3n anterior
 error.validator.names.mismatch=la entrada {0} contiene una clase con un nombre interno {1}, los nombres no coinciden
+error.validator.info.name.notequal=module-info.class en un directorio con versi\u00F3n contiene un nombre incorrecto
+error.validator.info.requires.transitive=module-info.class en un directorio con versiones contiene "requires transitive" adicionales
+error.validator.info.requires.added=module-info.class en un directorio con versi\u00F3n contiene "requires" adicionales
+error.validator.info.requires.dropped=module-info.class en un directorio con versiones contiene "requires" que faltan
+error.validator.info.exports.notequal=module-info.class en un directorio con versiones contiene "exports" diferentes
+error.validator.info.opens.notequal=module-info.class en un directorio con versiones contiene "opens" diferentes
+error.validator.info.provides.notequal=module-info.class en un directorio con versiones contiene "provides" diferentes
+error.validator.info.version.notequal={0}: module-info.class en un directorio con versiones contiene una "version" diferente
+error.validator.info.manclass.notequal={0}: module-info.class  en un directorio con versiones contiene una "main-class" diferente
 warn.validator.identical.entry=Advertencia: la entrada {0} contiene una clase id\u00E9ntica a una entrada que ya est\u00E1 en el archivo jar
 warn.validator.resources.with.same.name=Advertencia: la entrada {0} tiene varios recursos con el mismo nombre
 warn.validator.concealed.public.class=Advertencia: la entrada {0} es una clase p\u00FAblica\nen un paquete oculto. Colocar este archivo jar en la ruta de clase tendr\u00E1 como resultado\ninterfaces p\u00FAblicas no compatibles
+warn.release.unexpected.versioned.entry=entrada versionada inesperada {0}
 out.added.manifest=manifiesto agregado
 out.added.module-info=module-info agregado: {0}
+out.automodule=No se ha encontrado ning\u00FAn descriptor de m\u00F3dulo. M\u00F3dulo autom\u00E1tico derivado.
 out.update.manifest=manifiesto actualizado
 out.update.module-info=module-info actualizado: {0}
 out.ignore.entry=ignorando entrada {0}
@@ -88,17 +94,19 @@
 main.usage.summary=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] archivos] ...
 main.usage.summary.try=Intente `jar --help' para obtener m\u00E1s informaci\u00F3n.
 
-main.help.preopt=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crea un archivo para las clases y recursos y puede manipular o\nrestaurar clases individuales o recursos de un archivo.\n\n Ejemplos:\n # Crear un archivo denominado classes.jar con dos archivos de clase:\n jar --create --file classes.jar Foo.class Bar.class\n # Crear un archivo con un manifiesto existente, con todos los archivos en foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crear un archivo jar modular, donde el descriptor de m\u00F3dulo est\u00E1 en\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Actualizar un jar no modular en un jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Crear un archivo jar de varias versiones y colocar algunos archivos en el directorio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Sintaxis: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar crea un archivo para las clases y recursos, y puede manipular o\nrestaurar clases individuales o recursos de un archivo.\n\n Ejemplos:\n # Crear un archivo denominado classes.jar con dos archivos de clase:\n jar --create --file classes.jar Foo.class Bar.class\n # Crear un archivo con un manifiesto existente, con todos los archivos en foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crear un archivo jar modular, donde el descriptor de m\u00F3dulo est\u00E1 en\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Actualizar un jar no modular existente en un jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Crear un archivo jar de varias versiones y colocar algunos archivos en el directorio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPara acortar o simplificar el comando jar, puede especificar argumentos en un archivo\nde texto separado y transmitirlos al comando jar con el s\u00EDmbolo de arroba (@) como prefijo.\n\n Ejemplos:\n # Leer opciones adicionales y mostrar los archivos de clases del archivo classes.list\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ Modo de operaci\u00F3n principal:\n
 main.help.opt.main.create=\  -c, --create               Crear el archivo
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  Generar informaci\u00F3n de \u00EDndice para los archivos jar\n                             especificados
 main.help.opt.main.list=\  -t, --list                 Mostrar la tabla de contenido del archivo
 main.help.opt.main.update=\  -u, --update               Actualizar un archivo jar existente
 main.help.opt.main.extract=\  -x, --extract              Extraer determinados (o todos) los archivos del archivo
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  Imprimir el descriptor de m\u00F3dulo
+main.help.opt.main.describe-module=\  -d, --describe-module      Imprimir el descriptor de m\u00F3dulo, o un nombre de m\u00F3dulo autom\u00E1tico
 main.help.opt.any=\ Modificadores de operaci\u00F3n v\u00E1lidos en cualquier modo:\n\n  -C DIR                     Cambiar al directorio especificado e incluir el\n                             siguiente archivo
-main.help.opt.any.file=\  -f, --file=FILE            Nombre del archivo\n      --release VERSION      Se colocan todos los archivos siguientes en un directorio con versi\u00F3n\n                             del archivo jar (es decir, META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            El nombre del archivo. Si se omite, se usa stdin o\n                             stdout en funci\u00F3n de la operaci\u00F3n\n      --release VERSION      Se colocan todos los archivos siguientes en un directorio con versi\u00F3n\n                             del archivo jar (es decir, META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              Generar salida verbose en salida est\u00E1ndar
+main.help.opt.create=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n:\n
+main.help.opt.create.normalize=\  -n, --normalize            Normalizar informaci\u00F3n en el nuevo archivo jar\n                             despu\u00E9s de la creaci\u00F3n
 main.help.opt.create.update=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n y de actualizaci\u00F3n:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME Punto de entrada de la aplicaci\u00F3n para aplicaciones\n                             aut\u00F3nomas agrupadas en un archivo jar modular o\n                             ejecutable
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Incluir la informaci\u00F3n de manifiesto del archivo\n                             de manifiesto proporcionado
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n, actualizaci\u00F3n y generaci\u00F3n de \u00EDndice:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Solo almacenar; no usar compresi\u00F3n ZIP
 main.help.opt.other=\ Otras opciones:\n
-main.help.opt.other.help=\  -?, --help[:compat]        Utilice este valor, u opcionalmente la compatibilidad, ayuda
+main.help.opt.other.help=\  -h, --help[:compat]        Utilice este valor, u opcionalmente la compatibilidad, ayuda
 main.help.opt.other.help-extra=\      --help-extra           Prestar ayuda en las opciones adicionales
 main.help.opt.other.version=\      --version              Imprimir versi\u00F3n del programa
 main.help.postopt=\ Un archivo es un jar modular si el descriptor de m\u00F3dulo, 'module-info.class', est\u00E1\n en la ra\u00EDz de los directorios proporcionados o en la ra\u00EDz del archivo jar.\n Las siguientes operaciones solo son v\u00E1lidas si se va a crear un archivo jar modular\n o se va a actualizar un jar existente no modular: '--module-version',\n '--hash-modules' y '--module-path'.\n\n Los argumentos obligatorios u opcionales en las opciones largas tambi\u00E9n son obligatorios u opcionales\n en cualquiera de las opciones cortas.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=option non reconnue : {0}
 error.missing.arg=l''option {0} exige un argument
 error.bad.file.arg=Erreur lors de l'analyse des arguments de fichier
-error.bad.option=Une des options -{ctxu} doit \u00EAtre sp\u00E9cifi\u00E9e.
+error.bad.option=Une des options -{ctxuid} doit \u00EAtre sp\u00E9cifi\u00E9e.
 error.bad.cflag=L'indicateur c requiert la sp\u00E9cification d'un fichier manifeste ou d'un fichier d'entr\u00E9e.
 error.bad.uflag=L'indicateur u requiert la sp\u00E9cification d'un fichier manifeste, d'un fichier d'entr\u00E9e ou d'un indicateur e.
 error.bad.eflag=L'indicateur e et le fichier manifeste portant l'attribut Main-Class ne peuvent pas \u00EAtre sp\u00E9cifi\u00E9s \nensemble.
-error.bad.dflag=L''option ''-d, --print-module-descriptor'' ne requiert la sp\u00E9cification d''aucun fichier d''entr\u00E9e : {0}
+error.bad.dflag=L'option '-d, --describe-module' ne requiert la sp\u00E9cification d'aucun fichier d'entr\u00E9e
 error.bad.reason=raison incorrecte : {0}, la valeur doit \u00EAtre deprecated, deprecated-for-removal ou incubating
 error.nosuch.fileordir={0} : fichier ou r\u00E9pertoire introuvable
 error.write.file=Erreur lors de l'\u00E9criture d'un fichier JAR existant
@@ -42,16 +42,11 @@
 error.create.tempfile=Impossible de cr\u00E9er un fichier temporaire
 error.hash.dep=Hachage des d\u00E9pendances du module {0}, module {1} introuvable sur le chemin de module
 error.module.options.without.info=Une des options --module-version ou --hash-modules sans module-info.class
+error.no.operative.descriptor=Aucun descripteur op\u00E9rationnel pour la version : {0}
+error.no.root.descriptor=Aucun descripteur de module racine, indiquer --release
+error.unable.derive.automodule=Impossible de d\u00E9river le descripteur de module pour : {0}
 error.unexpected.module-info=Descripteur de module {0} inattendu
 error.module.descriptor.not.found=Descripteur de module introuvable
-error.validator.info.without.root=module-info.class a \u00E9t\u00E9 d\u00E9tect\u00E9 dans un r\u00E9pertoire avec num\u00E9ro de version sans module-info.class dans la racine
-error.validator.info.name.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un nom incorrect
-error.validator.info.requires.transitive=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des "exigences transitives" suppl\u00E9mentaires
-error.validator.info.requires.added=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" suppl\u00E9mentaires
-error.validator.info.requires.dropped=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" manquants
-error.validator.info.exports.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "exports" diff\u00E9rents
-error.validator.info.opens.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des "ouvertures" diff\u00E9rentes
-error.validator.info.provides.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "provides" diff\u00E9rents
 error.invalid.versioned.module.attribute=Attribut de descripteur de module non valide {0}
 error.missing.provider=Fournisseur de services introuvable : {0}
 error.release.value.notnumber=version {0} non valide
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=l''entr\u00E9e : {0} a une version de classe non compatible avec une version ant\u00E9rieure
 error.validator.different.api=l''entr\u00E9e : {0} contient une classe avec une API diff\u00E9rente de la version ant\u00E9rieure
 error.validator.names.mismatch=l''entr\u00E9e : {0} contient une classe avec le nom interne {1}, les noms ne concordent pas
+error.validator.info.name.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un nom incorrect
+error.validator.info.requires.transitive=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient un mot-cl\u00E9 "requires transitive" suppl\u00E9mentaire
+error.validator.info.requires.added=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" suppl\u00E9mentaires
+error.validator.info.requires.dropped=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "requires" manquants
+error.validator.info.exports.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "exports" diff\u00E9rents
+error.validator.info.opens.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "opens" diff\u00E9rents
+error.validator.info.provides.notequal=module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "provides" diff\u00E9rents
+error.validator.info.version.notequal={0} : module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "version" diff\u00E9rents
+error.validator.info.manclass.notequal={0} : module-info.class dans un r\u00E9pertoire avec num\u00E9ro de version contient des mots-cl\u00E9s "main-class" diff\u00E9rents
 warn.validator.identical.entry=Avertissement : l''entr\u00E9e {0} contient une classe\nidentique \u00E0 une entr\u00E9e qui se trouve d\u00E9j\u00E0 dans le fichier JAR
 warn.validator.resources.with.same.name=Avertissement : entr\u00E9e {0}, plusieurs ressources du m\u00EAme nom
 warn.validator.concealed.public.class=Avertissement : l''entr\u00E9e {0} est une classe publique\ndans un package dissimul\u00E9, le placement de ce fichier JAR sur le\nchemin de classe g\u00E9n\u00E9rera des interfaces publiques incompatibles
+warn.release.unexpected.versioned.entry=entr\u00E9e avec num\u00E9ro de version {0} inattendue
 out.added.manifest=manifeste ajout\u00E9
 out.added.module-info=module-info ajout\u00E9 : {0}
+out.automodule=Descripteur de module introuvable. Module automatique d\u00E9riv\u00E9.
 out.update.manifest=manifeste mis \u00E0 jour
 out.update.module-info=module-info mis \u00E0 jour : {0}
 out.ignore.entry=entr\u00E9e {0} ignor\u00E9e
@@ -88,17 +94,19 @@
 main.usage.summary=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=Pour plus d'informations, essayez 'jar --help'.
 
-main.help.preopt=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar cr\u00E9e une archive pour les classes et les ressources, et peut manipuler ou\nrestaurer les classes ou ressources individuelles \u00E0 partir d'une archive.\n\n Exemples :\n # Cr\u00E9ation d'une archive nomm\u00E9e classes.jar compos\u00E9e de deux fichiers de classe :\n jar --create --file classes.jar Foo.class Bar.class\n # Cr\u00E9ation d'une archive \u00E0 l'aide d'un manifeste existant, avec tous les fichiers dans foo/ :\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cr\u00E9ation d'une archive JAR modulaire, o\u00F9 le descripteur de module est situ\u00E9 dans\n # classes/module-info.class :\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Mise \u00E0 jour d'un fichier JAR non modulaire existant vers un fichier JAR modulaire :\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Cr\u00E9e un fichier JAR multiversion en pla\u00E7ant certains fichiers dans le r\u00E9pertoire META-INF/versions/9 :\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Syntaxe : jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar cr\u00E9e une archive pour les classes et les ressources, et peut manipuler ou\nrestaurer les classes ou ressources individuelles \u00E0 partir d'une archive.\n\n Exemples :\n # Cr\u00E9ation d'une archive nomm\u00E9e classes.jar compos\u00E9e de deux fichiers de classe :\n jar --create --file classes.jar Foo.class Bar.class\n # Cr\u00E9ation d'une archive \u00E0 l'aide d'un manifeste existant, avec tous les fichiers dans foo/ :\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cr\u00E9ation d'une archive JAR modulaire, o\u00F9 le descripteur de module est situ\u00E9 dans\n # classes/module-info.class :\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Mise \u00E0 jour d'un fichier JAR non modulaire existant vers un fichier JAR modulaire :\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Cr\u00E9e un fichier JAR multiversion en pla\u00E7ant certains fichiers dans le r\u00E9pertoire META-INF/versions/9 :\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPour raccourcir ou simplifier la commande JAR, vous pouvez sp\u00E9cifier des arguments dans un\nfichier texte distinct et le transmettre \u00E0 la commande JAR avec le signe arobase (@) en tant que pr\u00E9fixe.\n\n Exemples :\n # Options de lecture suppl\u00E9mentaires et liste des fichiers de classe \u00E0 partir du fichier classes.list\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ Mode d'exploitation principal :\n
 main.help.opt.main.create=\  -c, --create               Cr\u00E9e l'archive
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  G\u00E9n\u00E8re des informations d'index pour les archives JAR\n                             indiqu\u00E9es
 main.help.opt.main.list=\  -t, --list                 Affiche la table des mati\u00E8res de l'archive
 main.help.opt.main.update=\  -u, --update               Met \u00E0 jour une archive JAR existante
 main.help.opt.main.extract=\  -x, --extract              Extrait des fichiers nomm\u00E9s (ou tous les fichiers) de l'archive
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  Imprime le descripteur de module
+main.help.opt.main.describe-module=\  -d, --describe-module      afficher le descripteur de module ou le nom de module automatique
 main.help.opt.any=\ Modificateurs d'op\u00E9ration valides pour tous les modes :\n\n  -C DIR                     Passe au r\u00E9pertoire sp\u00E9cifi\u00E9 et inclut le\n                             fichier suivant
-main.help.opt.any.file=\  -f, --file=FILE            Nom de fichier d'archive\n      --release VERSION      Place tous les fichiers suivants dans un r\u00E9pertoire avec num\u00E9ro de version\n                             du fichier JAR (par exemple, META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            Nom du fichier d'archive. Lorsqu'il est omis, stdin ou\n                             stdout est utilis\u00E9 en fonction de l'op\u00E9ration\n      --release VERSION      Place tous les fichiers suivants dans un r\u00E9pertoire avec num\u00E9ro de version\n                             du fichier JAR (\u00E0 savoir META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              G\u00E9n\u00E8re une sortie en mode verbose d'une sortie standard
+main.help.opt.create=\ Modificateurs d'op\u00E9ration valides uniquement en mode create :\n
+main.help.opt.create.normalize=\  -n, --normalize            Normaliser des informations dans la nouvelle archive JAR\n                             apr\u00E8s la cr\u00E9ation
 main.help.opt.create.update=\ Modificateurs d'op\u00E9ration valides uniquement en modes create et update :\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME Point d'entr\u00E9e d'une application en mode autonome\n                             int\u00E9gr\u00E9e \u00E0 une archive JAR modulaire\n                             ou ex\u00E9cutable
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Inclut les informations de manifeste du fichier\n                             manifeste donn\u00E9
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ Modificateurs d'op\u00E9ration valides uniquement en modes create, update et generate-index :\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Stocke uniquement ; n'utilise pas de compression ZIP
 main.help.opt.other=\ Autres options :\n
-main.help.opt.other.help=\  -?, --help[:compat]        Affiche l'aide ou \u00E9ventuellement la compatibilit\u00E9
+main.help.opt.other.help=\  -h, --help[:compat]        Affiche l'aide ou \u00E9ventuellement la compatibilit\u00E9
 main.help.opt.other.help-extra=\      --help-extra           Affiche l'aide sur les options suppl\u00E9mentaires
 main.help.opt.other.version=\      --version              Imprime la version de programme
 main.help.postopt=\ Une archive est un fichier JAR modulaire si un descripteur de module, 'module-info.class', se\n trouve dans la racine des r\u00E9pertoires donn\u00E9s ou dans la racine de l'archive JAR\n elle-m\u00EAme. Les op\u00E9rations suivantes sont valides uniquement lors de la cr\u00E9ation d'un fichier JAR modulaire\n ou de la mise \u00E0 jour d'un fichier JAR non modulaire existant : '--module-version',\n '--hash-modules' et '--module-path'.\n\n Les arguments obligatoires ou facultatifs pour les options longues sont \u00E9galement obligatoires ou facultatifs\n pour toute option courte correspondante.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=opzione non riconosciuta: {0}
 error.missing.arg=l''opzione {0} richiede un argomento
 error.bad.file.arg=Errore durante l'analisi degli argomenti del file
-error.bad.option=\u00C8 necessario specificare una delle opzioni -{ctxu}.
+error.bad.option=\u00C8 necessario specificare una delle opzioni -{ctxuid}.
 error.bad.cflag=Per il flag 'c' \u00E8 necessario specificare file manifest o di input.
 error.bad.uflag=Per il flag 'u' \u00E8 necessario specificare il flag 'e' oppure file manifest o di input.
 error.bad.eflag=Il flag 'e' e il manifest con l'attributo 'Main-Class' non possono essere specificati\ninsieme.
-error.bad.dflag=Per l''opzione ''-d, --print-module-descriptor'' non \u00E8 necessario specificare alcun file di input: {0}
+error.bad.dflag=Per l'opzione '-d, --describe-module' non \u00E8 necessario specificare alcun file di input
 error.bad.reason=Motivo non valido: {0}. Deve essere deprecated, deprecated-for-removal o incubating
 error.nosuch.fileordir={0} : file o directory inesistente
 error.write.file=Errore durante la scrittura del file jar esistente
@@ -42,16 +42,11 @@
 error.create.tempfile=Impossibile creare il file temporaneo.
 error.hash.dep={0} dipendenze del modulo di hashing. Impossibile trovare il modulo {1} nel percorso del modulo
 error.module.options.without.info=Una delle opzioni --module-version o --hash-modules non contiene module-info.class
+error.no.operative.descriptor=Nessun descrittore operativo per la release: {0}
+error.no.root.descriptor=Nessun descrittore di modulo radice, specificare --release
+error.unable.derive.automodule=Impossibile derivare il descrittore di modulo per: {0}
 error.unexpected.module-info=Descrittore di modulo {0} imprevisto
 error.module.descriptor.not.found=Descrittore di modulo non trovato
-error.validator.info.without.root=module-info.class trovato in una directory con controllo delle versioni senza module-info.class nella radice
-error.validator.info.name.notequal=module-info.class in una directory con controllo delle versioni contiene un nome errato
-error.validator.info.requires.transitive=module-info.class in una directory con controllo delle versioni contiene valori "requires transitive" aggiuntivi
-error.validator.info.requires.added=module-info.class in una directory con controllo delle versioni contiene valori "requires" aggiuntivi
-error.validator.info.requires.dropped=module-info.class in una directory con controllo delle versioni contiene valori "requires" mancanti
-error.validator.info.exports.notequal=module-info.class in una directory con controllo delle versioni contiene "exports" differenti
-error.validator.info.opens.notequal=module-info.class in una directory con controllo delle versioni contiene valori "opens" differenti
-error.validator.info.provides.notequal=module-info.class in una directory con controllo delle versioni contiene valori "provides" differenti
 error.invalid.versioned.module.attribute=Attributo descrittore del modulo {0} non valido.
 error.missing.provider=Provider di servizi non trovato: {0}
 error.release.value.notnumber=release {0} non valida
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=la voce {0} ha una versione incompatibile con una versione precedente
 error.validator.different.api=la voce {0} contiene una classe con un''API diversa dalla versione precedente
 error.validator.names.mismatch=la voce {0} contiene una classe con nome interno {1}. I nomi non corrispondono
+error.validator.info.name.notequal=module-info.class in una directory con controllo delle versioni contiene un nome errato
+error.validator.info.requires.transitive=module-info.class in una directory con controllo delle versioni contiene valori "requires transitive" aggiuntivi
+error.validator.info.requires.added=module-info.class in una directory con controllo delle versioni contiene valori "requires" aggiuntivi
+error.validator.info.requires.dropped=module-info.class in una directory con controllo delle versioni contiene valori "requires" mancanti
+error.validator.info.exports.notequal=module-info.class in una directory con controllo delle versioni contiene "exports" differenti
+error.validator.info.opens.notequal=module-info.class in una directory con controllo delle versioni contiene valori "opens" differenti
+error.validator.info.provides.notequal=module-info.class in una directory con controllo delle versioni contiene valori "provides" differenti
+error.validator.info.version.notequal={0}: module-info.class in una directory con controllo delle versioni contiene valori "version" differenti
+error.validator.info.manclass.notequal={0}: module-info.class in una directory con controllo delle versioni contiene valori "main-class" differenti
 warn.validator.identical.entry=Avvertenza: la voce {0} contiene una classe\nidentica a una voce gi\u00E0 presente nel file jar
 warn.validator.resources.with.same.name=Avvertenza: voce {0}. Pi\u00F9 risorse con lo stesso nome
 warn.validator.concealed.public.class=Avvertenza: la voce {0} \u00E8 una classe pubblica\nin un package nascosto. Il posizionamento di questo file jar nel classpath\ngenerer\u00E0 interfacce pubbliche incompatibili
+warn.release.unexpected.versioned.entry=voce con controllo delle versioni non prevista {0}
 out.added.manifest=aggiunto manifest
 out.added.module-info=aggiunto module-info: {0}
+out.automodule=Nessun descrittore di modulo trovato. Derivato modulo automatico.
 out.update.manifest=aggiornato manifest
 out.update.module-info=aggiornato module-info: {0}
 out.ignore.entry=la voce {0} sar\u00E0 ignorata
@@ -88,17 +94,19 @@
 main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...
 main.usage.summary.try=Utilizzare 'jar --help' per ulteriori informazioni.
 
-main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...\nIl file jar crea un archivio per le classi e le risorse e pu\u00F2 manipolare o\nripristinare le singole classi o risorse da un archivio.\n\n Esempi:\n # Crea un archivio denominato classes.jar con due file di classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Crea un archivio mediante un file manifest esistente, con tutti i file in foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crea un archivio jar modulare, in cui il descrittore di modulo si trova in\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Aggiorna un file jar non modulare esistente in un file jar modulare:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Crea un file jar per pi\u00F9 release, posizionando alcuni file nella directory META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] file] ...\nIl file jar crea un archivio per le classi e le risorse e pu\u00F2 manipolare o\nripristinare le singole classi o risorse da un archivio.\n\n Esempi:\n # Crea un archivio denominato classes.jar con due file di classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Crea un archivio mediante un file manifest esistente, con tutti i file in foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Crea un archivio jar modulare, in cui il descrittore di modulo si trova in\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Aggiorna un file jar non modulare esistente in un file jar modulare:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Crea un file jar per pi\u00F9 release, posizionando alcuni file nella directory META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPer abbreviare o semplificare il comando jar, \u00E8 possibile specificare gli argomenti in un file\ndi testo distinto e passarlo al comando jar con il segno @ come prefisso.\n\n Esempi:\n # Legge le opzioni aggiuntive e la lista di file di classe dal file classes.list\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ Modalit\u00E0 di funzionamento principale:\n
 main.help.opt.main.create=\  -c, --create               Crea l'archivio
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  Genera le informazioni sull'indice per gli archivi\n                             jar specificati
 main.help.opt.main.list=\  -t, --list                 Visualizza l'indice dell'archivio
 main.help.opt.main.update=\  -u, --update               Aggiorna un archivio jar esistente
 main.help.opt.main.extract=\  -x, --extract              Estrae i file con nome (o tutti i file) dall'archivio
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  Stampa il descrittore del modulo
+main.help.opt.main.describe-module=\  -d, --describe-module      Visualizza il descrittore di modulo o il nome modulo automatico
 main.help.opt.any=\ Modificatori di funzionamento validi in qualsiasi modalit\u00E0:\n\n  -C DIR                     Passa alla directory specificata e include il\n                              file seguente
-main.help.opt.any.file=\  -f, --file=FILE            Il nome file dell'archivio.\n      --release VERSION      Inserisce tutti i file riportati di seguito in una directory con\n                             controllo delle versioni del file JAR (ovvero META-INF/versions/VERSION/).
+main.help.opt.any.file=\  -f, --file=FILE            Il nome file dell'archivio. Se omesso, viene usato stdin o\n                             stdout in base all'operazione\n      --release VERSION      Posiziona tutti i file successivi in una directory con controllo delle versioni\n                             del file jar (ad esempio, META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              Genera l'output descrittivo nell'output standard
+main.help.opt.create=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione:\n
+main.help.opt.create.normalize=\  -n, --normalize            Normalizza le informazioni nel nuovo archivio jar\n                             dopo la creazione
 main.help.opt.create.update=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione e aggiornamento:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME Punto di ingresso per le applicazioni\n                             stand-alone incluse nell'archivio jar modulare o\n                             eseguibile
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Include le informazioni sul file manifest dal file\n                             manifest specificato
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione, aggiornamento e di generazione dell'indice:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Solo per la memorizzazione. Non utilizza alcuna compressione ZIP
 main.help.opt.other=\ Altre opzioni:\n
-main.help.opt.other.help=\  -?, --help[:compat]        Fornisce questa Guida o facoltativamente la Guida sulla compatibilit\u00E0
+main.help.opt.other.help=\  -h, --help[:compat]        Fornisce questa Guida o facoltativamente la Guida sulla compatibilit\u00E0
 main.help.opt.other.help-extra=\      --help-extra           Fornisce la Guida per le opzioni non standard
 main.help.opt.other.version=\      --version              Stampa la versione del programma
 main.help.postopt=\ Un archivio \u00E8 un file jar modulare se un descrittore di modulo, 'module-info.class', si trova\n nella directory radice delle directory specificate o nella radice dell'archivio jar\n stesso. Le operazioni seguenti sono valide solo durante la creazione di un file jar modulare\n o l'aggiornamento di un file jar non modulare esistente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Gli argomenti obbligatori o facoltativi per le opzioni lunghe sono obbligatori\n  o facoltativi anche per le opzioni brevi corrispondenti.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=\u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
 error.missing.arg=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306B\u306F\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002
 error.bad.file.arg=\u30D5\u30A1\u30A4\u30EB\u5F15\u6570\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxu}\u306E\u3046\u3061\u306E1\u3064\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+error.bad.option=\u30AA\u30D7\u30B7\u30E7\u30F3-{ctxuid}\u306E\u3046\u3061\u306E1\u3064\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
 error.bad.cflag=\u30D5\u30E9\u30B0'c'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002
 error.bad.uflag=\u30D5\u30E9\u30B0'u'\u3067\u306F\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304B'e'\u30D5\u30E9\u30B0\u3001\u307E\u305F\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u304C\u5FC5\u8981\u3067\u3059\u3002
 error.bad.eflag='e'\u30D5\u30E9\u30B0\u3068'Main-Class'\u5C5E\u6027\u3092\u6301\u3064\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u540C\u6642\u306B\n\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
-error.bad.dflag=''-d, --print-module-descriptor''\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u306F\u4E0D\u8981\u3067\u3059: {0}
+error.bad.dflag='-d, --describe-module'\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u306F\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u6307\u5B9A\u306F\u4E0D\u8981\u3067\u3059
 error.bad.reason=\u4E0D\u6B63\u306A\u7406\u7531: {0}\u3001\u975E\u63A8\u5968\u3001\u524A\u9664\u4E88\u5B9A\u306E\u975E\u63A8\u5968\u307E\u305F\u306F\u5B9F\u9A13\u7684\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 error.nosuch.fileordir={0}\u3068\u3044\u3046\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u3042\u308A\u307E\u305B\u3093
 error.write.file=\u65E2\u5B58jar\u30D5\u30A1\u30A4\u30EB\u306E\u66F8\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
@@ -42,16 +42,11 @@
 error.create.tempfile=\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
 error.hash.dep=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u4F9D\u5B58\u6027\u306E\u30CF\u30C3\u30B7\u30E5\u3067\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304C\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 error.module.options.without.info=--module-version\u307E\u305F\u306F--hash-modules\u306E\u3044\u305A\u308C\u304B\u3067module-info.class\u304C\u3042\u308A\u307E\u305B\u3093
+error.no.operative.descriptor=\u30EA\u30EA\u30FC\u30B9\u306E\u64CD\u4F5C\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306F\u3042\u308A\u307E\u305B\u3093: {0}
+error.no.root.descriptor=\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002--release\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044
+error.unable.derive.automodule=\u6B21\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u5C0E\u51FA\u3067\u304D\u307E\u305B\u3093: {0}
 error.unexpected.module-info=\u4E88\u671F\u3057\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}
 error.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-error.validator.info.without.root=module-info.class\u304C\u3001\u30EB\u30FC\u30C8\u306Bmodule-info.class\u306E\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-error.validator.info.name.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B63\u3057\u304F\u306A\u3044\u540D\u524D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.requires.transitive=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires transitive"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.requires.added=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.requires.dropped=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B20\u843D\u3057\u3066\u3044\u308B"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.exports.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"exports"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.opens.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"opens"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
-error.validator.info.provides.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"provides"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
 error.invalid.versioned.module.attribute=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u5C5E\u6027{0}\u304C\u7121\u52B9\u3067\u3059
 error.missing.provider=\u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
 error.release.value.notnumber=\u30EA\u30EA\u30FC\u30B9{0}\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u4E92\u63DB\u6027\u306E\u306A\u3044\u30AF\u30E9\u30B9\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u304C\u542B\u307E\u308C\u307E\u3059
 error.validator.different.api=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u4EE5\u524D\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3068\u306F\u7570\u306A\u308BAPI\u3092\u6301\u3064\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059
 error.validator.names.mismatch=\u30A8\u30F3\u30C8\u30EA: {0}\u306B\u306F\u3001\u5185\u90E8\u540D{1}\u3092\u6301\u3064\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059\u304C\u3001\u540D\u524D\u304C\u4E00\u81F4\u3057\u307E\u305B\u3093
+error.validator.info.name.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B63\u3057\u304F\u306A\u3044\u540D\u524D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.requires.transitive=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires transitive"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.requires.added=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u8FFD\u52A0\u306E"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.requires.dropped=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u6B20\u843D\u3057\u3066\u3044\u308B"requires"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.exports.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"exports"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.opens.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"opens"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.provides.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"provides"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.version.notequal={0}: \u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"version"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.validator.info.manclass.notequal={0}: \u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Emodule-info.class\u306B\u7570\u306A\u308B"main-class"\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
 warn.validator.identical.entry=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u306B\u306F\u3001jar\u306B\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\n\u30A8\u30F3\u30C8\u30EA\u3068\u540C\u3058\u30AF\u30E9\u30B9\u304C\u542B\u307E\u308C\u307E\u3059
 warn.validator.resources.with.same.name=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u3001\u540C\u3058\u540D\u524D\u3092\u6301\u3064\u8907\u6570\u306E\u30EA\u30BD\u30FC\u30B9
 warn.validator.concealed.public.class=\u8B66\u544A : \u30A8\u30F3\u30C8\u30EA{0}\u306F\u3001\u96A0\u3057\u30D1\u30C3\u30B1\u30FC\u30B8\u5185\u306Epublic\u30AF\u30E9\u30B9\u3067\u3059\u3002\n\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u3053\u306Ejar\u3092\u914D\u7F6E\u3059\u308B\u3068\u3001\u4E92\u63DB\u6027\u306E\u306A\u3044\npublic\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u3059
+warn.release.unexpected.versioned.entry=\u4E88\u671F\u3057\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u6E08\u30A8\u30F3\u30C8\u30EA{0}
 out.added.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
 out.added.module-info=module-info\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F: {0}
+out.automodule=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u5C0E\u51FA\u3055\u308C\u307E\u3057\u305F\u3002
 out.update.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F
 out.update.module-info=module-info\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F: {0}
 out.ignore.entry=\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
@@ -88,17 +94,19 @@
 main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=\u8A73\u7D30\u306F\u3001`jar --help'\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 
-main.help.preopt=\u4F7F\u7528\u65B9\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar\u306F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u500B\u3005\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\n\u30EA\u30BD\u30FC\u30B9\u3092\u64CD\u4F5C\u307E\u305F\u306F\u5FA9\u5143\u3067\u304D\u307E\u3059\u3002\n\n \u4F8B:\n # 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080classes.jar\u3068\u3044\u3046\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar Foo.class Bar.class\n # foo/\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080\u3001\u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u305F\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u30E2\u30B8\u30E5\u30E9jar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B\u3002\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306Fclasses/module-info.class\u306B\n # \u3042\u308B:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u3092\u30E2\u30B8\u30E5\u30E9jar\u306B\u66F4\u65B0\u3059\u308B:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \u8907\u6570\u30EA\u30EA\u30FC\u30B9jar\u3092\u4F5C\u6210\u3057\u3001\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092META-INF/versions/9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u914D\u7F6E\u3059\u308B:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\u4F7F\u7528\u65B9\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar\u306F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u306E\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u500B\u3005\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\n\u30EA\u30BD\u30FC\u30B9\u3092\u64CD\u4F5C\u307E\u305F\u306F\u5FA9\u5143\u3067\u304D\u307E\u3059\u3002\n\n \u4F8B:\n # 2\u3064\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080classes.jar\u3068\u3044\u3046\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar Foo.class Bar.class\n # foo/\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3080\u3001\u65E2\u5B58\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u305F\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u30E2\u30B8\u30E5\u30E9jar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3059\u308B\u3002\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306Fclasses/module-info.class\u306B\n # \u3042\u308B:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u3092\u30E2\u30B8\u30E5\u30E9jar\u306B\u66F4\u65B0\u3059\u308B:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \u8907\u6570\u30EA\u30EA\u30FC\u30B9jar\u3092\u4F5C\u6210\u3057\u3001\u4E00\u90E8\u306E\u30D5\u30A1\u30A4\u30EB\u3092META-INF/versions/9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u914D\u7F6E\u3059\u308B:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\njar\u30B3\u30DE\u30F3\u30C9\u3092\u77ED\u7E2E\u307E\u305F\u306F\u7C21\u7565\u5316\u3059\u308B\u306B\u306F\u3001\u500B\u5225\u306E\u30C6\u30AD\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u5F15\u6570\u3092\u6307\u5B9A\u3057\u3001\n\u8A18\u53F7(@)\u3092\u63A5\u982D\u8F9E\u3068\u3057\u3066\u4F7F\u7528\u3057\u3066jar\u30B3\u30DE\u30F3\u30C9\u306B\u6E21\u3057\u307E\u3059\u3002\n\n \u4F8B:\n # \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u304A\u3088\u3073\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30EA\u30B9\u30C8\u3092\u30D5\u30A1\u30A4\u30EBclasses.list\u304B\u3089\u8AAD\u8FBC\u307F\u307E\u3059\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ \u30E1\u30A4\u30F3\u64CD\u4F5C\u30E2\u30FC\u30C9:\n
 main.help.opt.main.create=\  -c\u3001--create               \u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u307E\u3059
 main.help.opt.main.generate-index=\  -i,\u3001--generate-index=FILE  \u6307\u5B9A\u306Ejar\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u7D22\u5F15\u60C5\u5831\u3092\n                             \u751F\u6210\u3057\u307E\u3059
 main.help.opt.main.list=\  -t\u3001--list                 \u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u5185\u5BB9\u3092\u4E00\u89A7\u8868\u793A\u3057\u307E\u3059
 main.help.opt.main.update=\  -u\u3001--update               \u65E2\u5B58\u306Ejar\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u66F4\u65B0\u3057\u307E\u3059
 main.help.opt.main.extract=\  -x\u3001--extract              \u6307\u5B9A\u306E(\u307E\u305F\u306F\u3059\u3079\u3066\u306E)\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30FC\u30AB\u30A4\u30D6\u304B\u3089\u62BD\u51FA\u3057\u307E\u3059
-main.help.opt.main.print-module-descriptor=\  -d\u3001--print-module-descriptor  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u51FA\u529B\u3057\u307E\u3059
+main.help.opt.main.describe-module=\  -d, --describe-module      \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u307E\u305F\u306F\u81EA\u52D5\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u3092\u51FA\u529B\u3057\u307E\u3059
 main.help.opt.any=\ \u3069\u306E\u30E2\u30FC\u30C9\u3067\u3082\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n\n  -C DIR                     \u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u5909\u66F4\u3057\u3001\u6B21\u306E\u30D5\u30A1\u30A4\u30EB\u3092\n                             \u53D6\u308A\u8FBC\u307F\u307E\u3059
-main.help.opt.any.file=\  -f\u3001--file=FILE            \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\n      --release VERSION      \u6B21\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092jar\u306E\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                             (\u3064\u307E\u308A\u3001META-INF/versions/VERSION/)\u306B\u914D\u7F6E\u3057\u307E\u3059
+main.help.opt.any.file=\  -f\u3001--file=FILE            \u30A2\u30FC\u30AB\u30A4\u30D6\u30FB\u30D5\u30A1\u30A4\u30EB\u540D\u3002\u7701\u7565\u3057\u305F\u5834\u5408\u3001stdin\u307E\u305F\u306F\n                             stdout\u306E\u3044\u305A\u308C\u304B\u304C\u64CD\u4F5C\u306B\u57FA\u3065\u3044\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\n      --release VERSION      \u6B21\u306E\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3092jar\u306E\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u3055\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n                             (\u3064\u307E\u308A\u3001META-INF/versions/VERSION/)\u306B\u914D\u7F6E\u3057\u307E\u3059
 main.help.opt.any.verbose=\  -v\u3001--verbose              \u6A19\u6E96\u51FA\u529B\u306B\u8A73\u7D30\u306A\u51FA\u529B\u3092\u751F\u6210\u3057\u307E\u3059
+main.help.opt.create=\ \u4F5C\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
+main.help.opt.create.normalize=\  -n\u3001--normalize            \u65B0\u3057\u3044jar\u30A2\u30FC\u30AB\u30A4\u30D6\u306E\u4F5C\u6210\u5F8C\u3001\u542B\u307E\u308C\u308B\u60C5\u5831\u3092\n                             \u6B63\u898F\u5316\u3057\u307E\u3059
 main.help.opt.create.update=\ \u4F5C\u6210\u307E\u305F\u306F\u66F4\u65B0\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
 main.help.opt.create.update.main-class=\  -e\u3001--main-class=CLASSNAME \u30E2\u30B8\u30E5\u30E9\u307E\u305F\u306F\u5B9F\u884C\u53EF\u80FD\u306Ajar\u30A2\u30FC\u30AB\u30A4\u30D6\u306B\n                             \u30D0\u30F3\u30C9\u30EB\u3055\u308C\u305F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u306E\n                             \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30F3\u30C8\u30EA\u30FB\u30DD\u30A4\u30F3\u30C8
 main.help.opt.create.update.manifest=\  -m\u3001--manifest=FILE        \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\n                             \u53D6\u308A\u8FBC\u307F\u307E\u3059
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ \u4F5C\u6210\u3001\u66F4\u65B0\u304A\u3088\u3073\u7D22\u5F15\u751F\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          \u683C\u7D0D\u306E\u307F\u3002ZIP\u5727\u7E2E\u3092\u4F7F\u7528\u3057\u307E\u305B\u3093
 main.help.opt.other=\ \u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3:\n
-main.help.opt.other.help=\  -?, --help[:compat]        \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059
+main.help.opt.other.help=\  -h\u3001--help[:compat]        \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059
 main.help.opt.other.help-extra=\      --help-extra           \u8FFD\u52A0\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30D8\u30EB\u30D7\u3092\u63D0\u4F9B\u3057\u307E\u3059
 main.help.opt.other.version=\      --version              \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u307E\u3059
 main.help.postopt=\ \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF'module-info.class'\u304C\u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EB\u30FC\u30C8\u307E\u305F\u306F\n jar\u30A2\u30FC\u30AB\u30A4\u30D6\u81EA\u4F53\u306E\u30EB\u30FC\u30C8\u306B\u3042\u308B\u5834\u5408\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u306F\u30E2\u30B8\u30E5\u30E9jar\u3067\u3059\u3002\n \u6B21\u306E\u64CD\u4F5C\u306F\u3001\u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n \u306E\u307F\u6709\u52B9\u3067\u3059:  '--module-version'\u3001\n '--hash-modules'\u304A\u3088\u3073'--module-path'\u3002\n\n \u30ED\u30F3\u30B0\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3078\u306E\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u30B7\u30E7\u30FC\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\n \u306B\u5BFE\u3057\u3066\u3082\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306A\u308A\u307E\u3059\u3002
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC635\uC158: {0}
 error.missing.arg={0} \uC635\uC158\uC5D0 \uC778\uC218\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
 error.bad.file.arg=\uD30C\uC77C \uC778\uC218 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-error.bad.option=\uC635\uC158 -{ctxu} \uC911 \uD558\uB098\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
+error.bad.option=-{ctxuid} \uC635\uC158 \uC911 \uD558\uB098\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.
 error.bad.cflag='c' \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 Manifest \uB610\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4!
 error.bad.uflag='u' \uD50C\uB798\uADF8\uB97C \uC0AC\uC6A9\uD558\uB824\uBA74 Manifest, 'e' \uD50C\uB798\uADF8 \uB610\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4!
 error.bad.eflag='e' \uD50C\uB798\uADF8 \uBC0F Manifest\uB97C 'Main-Class' \uC18D\uC131\uACFC \uD568\uAED8 \uC9C0\uC815\uD560 \uC218\n\uC5C6\uC2B5\uB2C8\uB2E4!
-error.bad.dflag=''-d, --print-module-descriptor'' \uC635\uC158\uC5D0\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. {0}
+error.bad.dflag='-d, --describe-module' \uC635\uC158\uC5D0\uB294 \uC785\uB825 \uD30C\uC77C\uC744 \uC9C0\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
 error.bad.reason=\uC798\uBABB\uB41C \uC6D0\uC778: {0}\uC740(\uB294) deprecated, deprecated-for-removal \uB610\uB294 incubating \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4.
 error.nosuch.fileordir={0}: \uD574\uB2F9 \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
 error.write.file=\uAE30\uC874 jar \uD30C\uC77C\uC5D0 \uC4F0\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
@@ -42,16 +42,11 @@
 error.create.tempfile=\uC784\uC2DC \uD30C\uC77C\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 error.hash.dep=\uBAA8\uB4C8 {0} \uC885\uC18D\uC131\uC744 \uD574\uC2DC\uD558\uB294 \uC911 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C {1} \uBAA8\uB4C8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 error.module.options.without.info=module-info.class \uC5C6\uC774 --module-version \uB610\uB294 --hash-modules \uC911 \uD558\uB098
+error.no.operative.descriptor=\uB9B4\uB9AC\uC2A4\uC5D0 \uB300\uD55C \uC791\uB3D9 \uAE30\uC220\uC790 \uC5C6\uC74C: {0}
+error.no.root.descriptor=\uB8E8\uD2B8 \uBAA8\uB4C8 \uAE30\uC220\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. --release\uB97C \uC9C0\uC815\uD558\uC2ED\uC2DC\uC624.
+error.unable.derive.automodule=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uD30C\uC0DD\uD560 \uC218 \uC5C6\uC74C: {0}
 error.unexpected.module-info=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBAA8\uB4C8 \uAE30\uC220\uC790 {0}
 error.module.descriptor.not.found=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C
-error.validator.info.without.root=\uB8E8\uD2B8\uC5D0\uC11C module-info.class \uC5C6\uC774 \uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC5D0\uC11C module-info.class\uAC00 \uBC1C\uACAC\uB428
-error.validator.info.name.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC774 \uD3EC\uD568\uB428
-error.validator.info.requires.transitive=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires transitive" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.requires.added=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.requires.dropped=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB204\uB77D\uB41C "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.exports.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "exports" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.opens.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "opens" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
-error.validator.info.provides.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "provides" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
 error.invalid.versioned.module.attribute=\uBD80\uC801\uD569\uD55C \uBAA8\uB4C8 \uAE30\uC220\uC790 \uC18D\uC131 {0}
 error.missing.provider=\uC11C\uBE44\uC2A4 \uC81C\uACF5\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
 error.release.value.notnumber=\uB9B4\uB9AC\uC2A4 {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD568
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version={0} \uD56D\uBAA9\uC5D0 \uC774\uC804 \uBC84\uC804\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uD074\uB798\uC2A4 \uBC84\uC804\uC774 \uC788\uC2B5\uB2C8\uB2E4.
 error.validator.different.api={0} \uD56D\uBAA9\uC5D0 \uC774\uC804 \uBC84\uC804\uACFC \uB2E4\uB978 api\uB97C \uAC00\uC9C4 \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
 error.validator.names.mismatch={0} \uD56D\uBAA9\uC5D0 \uB0B4\uBD80 \uC774\uB984 {1}\uC744(\uB97C) \uAC00\uC9C4 \uD074\uB798\uC2A4\uAC00 \uC788\uC9C0\uB9CC \uC774\uB984\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+error.validator.info.name.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC774 \uD3EC\uD568\uB428
+error.validator.info.requires.transitive=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires transitive" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.requires.added=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uCD94\uAC00 "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.requires.dropped=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB204\uB77D\uB41C "requires" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.exports.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "exports" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.opens.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "opens" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.provides.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "provides" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.version.notequal={0}: \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "version" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.validator.info.manclass.notequal={0}: \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uC758 module-info.class\uC5D0 \uB2E4\uB978 "main-class" \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
 warn.validator.identical.entry=\uACBD\uACE0: {0} \uD56D\uBAA9\uC5D0 \uC774\uBBF8 jar\uC5D0 \uC788\uB294 \uD56D\uBAA9\uACFC\n\uB3D9\uC77C\uD55C \uD074\uB798\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
 warn.validator.resources.with.same.name=\uACBD\uACE0: {0} \uD56D\uBAA9\uC5D0 \uB3D9\uC77C\uD55C \uC774\uB984\uC758 \uC5EC\uB7EC \uB9AC\uC18C\uC2A4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.
 warn.validator.concealed.public.class=\uACBD\uACE0: {0} \uD56D\uBAA9\uC740 \uC228\uACA8\uC9C4 \uD328\uD0A4\uC9C0\uC5D0 \uC788\uB294\n\uACF5\uC6A9 \uD074\uB798\uC2A4\uC785\uB2C8\uB2E4. \uC774 jar\uC744 \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0 \uBC30\uCE58\uD558\uBA74\n\uACF5\uC6A9 \uC778\uD130\uD398\uC774\uC2A4\uAC00 \uD638\uD658\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+warn.release.unexpected.versioned.entry=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBC84\uC804\uC774 \uC9C0\uC815\uB41C \uD56D\uBAA9 {0}\uC785\uB2C8\uB2E4.
 out.added.manifest=Manifest\uB97C \uCD94\uAC00\uD568
 out.added.module-info=\uCD94\uAC00\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0}
+out.automodule=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uB3D9 \uBAA8\uB4C8\uC744 \uD30C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
 out.update.manifest=Manifest\uB97C \uC5C5\uB370\uC774\uD2B8\uD568
 out.update.module-info=\uC5C5\uB370\uC774\uD2B8\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0}
 out.ignore.entry={0} \uD56D\uBAA9\uC744 \uBB34\uC2DC\uD558\uB294 \uC911
@@ -88,17 +94,19 @@
 main.usage.summary=\uC0AC\uC6A9\uBC95: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=\uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uBCF4\uB824\uBA74 'jar --help'\uB97C \uC2E4\uD589\uD558\uC2ED\uC2DC\uC624.
 
-main.help.preopt=\uC0AC\uC6A9\uBC95: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar\uB294 \uD074\uB798\uC2A4 \uBC0F \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C\n\uAC1C\uBCC4 \uD074\uB798\uC2A4\uB098 \uB9AC\uC18C\uC2A4\uB97C \uC870\uC791\uD558\uAC70\uB098 \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n \uC608\uC81C:\n # \uB450 \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uC0AC\uC6A9\uD558\uC5EC classes.jar\uB77C\uB294 \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar Foo.class Bar.class\n # \uAE30\uC874 Manifest\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB4E0 \uD30C\uC77C\uC774 foo/\uC5D0 \uD3EC\uD568\uB41C \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \uBAA8\uB4C8 \uAE30\uC220\uC790\uAC00 classes/module-info.class\uC5D0 \uC704\uCE58\uD55C\n # \uBAA8\uB4C8\uD615 jar \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C \uBAA8\uB4C8\uD615 jar\uB85C \uC5C5\uB370\uC774\uD2B8:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \uC77C\uBD80 \uD30C\uC77C\uC774 META-INF/versions/9 \uB514\uB809\uD1A0\uB9AC\uC5D0 \uC704\uCE58\uD55C \uB2E4\uC911 \uB9B4\uB9AC\uC2A4 jar \uC0DD\uC131:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\uC0AC\uC6A9\uBC95: jar [OPTION...] [ [--release VERSION] [-C dir] \uD30C\uC77C] ...\njar\uB294 \uD074\uB798\uC2A4 \uBC0F \uB9AC\uC18C\uC2A4\uC5D0 \uB300\uD55C \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4. \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C\n\uAC1C\uBCC4 \uD074\uB798\uC2A4\uB098 \uB9AC\uC18C\uC2A4\uB97C \uC870\uC791\uD558\uAC70\uB098 \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n \uC608\uC81C:\n # \uB450 \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uC0AC\uC6A9\uD558\uC5EC classes.jar\uB77C\uB294 \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar Foo.class Bar.class\n # \uAE30\uC874 Manifest\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB4E0 \uD30C\uC77C\uC774 foo/\uC5D0 \uD3EC\uD568\uB41C \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \uBAA8\uB4C8 \uAE30\uC220\uC790\uAC00 classes/module-info.class\uC5D0 \uC704\uCE58\uD55C\n # \uBAA8\uB4C8\uD615 jar \uC544\uCE74\uC774\uBE0C \uC0DD\uC131:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C \uBAA8\uB4C8\uD615 jar\uB85C \uC5C5\uB370\uC774\uD2B8:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \uC77C\uBD80 \uD30C\uC77C\uC774 META-INF/versions/9 \uB514\uB809\uD1A0\uB9AC\uC5D0 \uC704\uCE58\uD55C \uB2E4\uC911 \uB9B4\uB9AC\uC2A4 jar \uC0DD\uC131:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\njar \uBA85\uB839\uC744 \uC9E7\uAC8C \uB9CC\uB4E4\uAC70\uB098 \uB2E8\uC21C\uD654\uD558\uB824\uBA74 \uBCC4\uB3C4\uC758 \uD14D\uC2A4\uD2B8 \uD30C\uC77C\uC5D0 \uC778\uC218\uB97C \uC9C0\uC815\uD558\uACE0\nat \uAE30\uD638(@)\uB97C \uC811\uB450\uC5B4\uB85C \uC0AC\uC6A9\uD558\uC5EC jar \uBA85\uB839\uC5D0 \uC804\uB2EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\n \uC608\uC81C:\n # classes.list \uD30C\uC77C\uC5D0\uC11C \uCD94\uAC00 \uC635\uC158 \uBC0F \uD074\uB798\uC2A4 \uD30C\uC77C \uBAA9\uB85D \uC77D\uAE30\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ \uAE30\uBCF8 \uC791\uC5C5 \uBAA8\uB4DC:\n
 main.help.opt.main.create=\  -c, --create               \uC544\uCE74\uC774\uBE0C\uB97C \uC0DD\uC131\uD569\uB2C8\uB2E4.
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  \uC9C0\uC815\uB41C jar \uC544\uCE74\uC774\uBE0C\uC5D0 \uB300\uD55C \uC778\uB371\uC2A4 \uC815\uBCF4\uB97C\n                             \uC0DD\uC131\uD569\uB2C8\uB2E4.
 main.help.opt.main.list=\  -t, --list                 \uC544\uCE74\uC774\uBE0C\uC5D0 \uB300\uD55C \uBAA9\uCC28\uB97C \uB098\uC5F4\uD569\uB2C8\uB2E4.
 main.help.opt.main.update=\  -u, --update               \uAE30\uC874 jar \uC544\uCE74\uC774\uBE0C\uB97C \uC5C5\uB370\uC774\uD2B8\uD569\uB2C8\uB2E4.
 main.help.opt.main.extract=\  -x, --extract              \uBA85\uBA85\uB41C(\uB610\uB294 \uBAA8\uB4E0) \uD30C\uC77C\uC744 \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C \uCD94\uCD9C\uD569\uB2C8\uB2E4.
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  \uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.
+main.help.opt.main.describe-module=\  -d, --describe-module      \uBAA8\uB4C8 \uAE30\uC220\uC790 \uB610\uB294 \uC790\uB3D9 \uBAA8\uB4C8 \uC774\uB984\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.
 main.help.opt.any=\ \uBAA8\uB4E0 \uBAA8\uB4DC\uC5D0\uC11C \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n\n  -C DIR                     \uC9C0\uC815\uB41C \uB514\uB809\uD1A0\uB9AC\uB85C \uBCC0\uACBD\uD558\uACE0 \uB2E4\uC74C \uD30C\uC77C\uC744\n                             \uD3EC\uD568\uD569\uB2C8\uB2E4.
-main.help.opt.any.file=\  -f, --file=FILE            \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984\uC785\uB2C8\uB2E4.\n      --release VERSION      \uB2E4\uC74C \uBAA8\uB4E0 \uD30C\uC77C\uC744 \uBC84\uC804 \uC9C0\uC815\uB41C jar \uB514\uB809\uD1A0\uB9AC\n                             (\uC608: META-INF/versions/VERSION/)\uC5D0 \uBC30\uCE58\uD569\uB2C8\uB2E4.
+main.help.opt.any.file=\  -f, --file=FILE            \uC544\uCE74\uC774\uBE0C \uD30C\uC77C \uC774\uB984\uC785\uB2C8\uB2E4. \uC0DD\uB7B5\uD560 \uACBD\uC6B0 \uC791\uC5C5\uC5D0 \uB530\uB77C \n                             stdin \uB610\uB294 stdout\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.\n      --release VERSION      \uB2E4\uC74C \uBAA8\uB4E0 \uD30C\uC77C\uC744 \uBC84\uC804 \uC9C0\uC815\uB41C jar \uB514\uB809\uD1A0\uB9AC\n                             (\uC608: META-INF/versions/VERSION/)\uC5D0 \uBC30\uCE58\uD569\uB2C8\uB2E4.
 main.help.opt.any.verbose=\  -v, --verbose              \uD45C\uC900 \uCD9C\uB825\uC5D0 \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.
+main.help.opt.create=\ \uC0DD\uC131 \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
+main.help.opt.create.normalize=\  -n, --normalize            \uC0DD\uC131 \uD6C4 \uC0C8 jar \uC544\uCE74\uC774\uBE0C\uC5D0\uC11C \uC815\uBCF4\uB97C\n                             \uC815\uADDC\uD654\uD569\uB2C8\uB2E4.
 main.help.opt.create.update=\ \uC0DD\uC131 \uBC0F \uC5C5\uB370\uC774\uD2B8 \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME \uBAA8\uB4C8\uD615 \uB610\uB294 \uC2E4\uD589\uD615 jar \uC544\uCE74\uC774\uBE0C\uC5D0 \uBC88\uB4E4\uB85C\n                             \uC81C\uACF5\uB41C \uB3C5\uB9BD\uD615 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\uC758 \uC560\uD50C\uB9AC\uCF00\uC774\uC158\n                             \uC2DC\uC791 \uC9C0\uC810\uC785\uB2C8\uB2E4.
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        \uC9C0\uC815\uB41C Manifest \uD30C\uC77C\uC758 Manifest \uC815\uBCF4\uB97C\n                             \uD3EC\uD568\uD569\uB2C8\uB2E4.
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ \uC0DD\uC131, \uC5C5\uB370\uC774\uD2B8 \uBC0F generate-index \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          \uC800\uC7A5 \uC804\uC6A9\uC774\uBA70 ZIP \uC555\uCD95\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 main.help.opt.other=\ \uAE30\uD0C0 \uC635\uC158:\n
-main.help.opt.other.help=\  -?, --help[:compat]        \uC774 \uB3C4\uC6C0\uB9D0(\uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uD638\uD658\uC131)\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
+main.help.opt.other.help=\  -h, --help[:compat]        \uC774 \uB3C4\uC6C0\uB9D0(\uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uD638\uD658\uC131)\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
 main.help.opt.other.help-extra=\      --help-extra           \uCD94\uAC00 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
 main.help.opt.other.version=\      --version              \uD504\uB85C\uADF8\uB7A8 \uBC84\uC804\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.
 main.help.postopt=\ \uC544\uCE74\uC774\uBE0C\uB294 \uBAA8\uB4C8 \uAE30\uC220\uC790 'module-info.class'\uAC00 \uC8FC\uC5B4\uC9C4 \uB514\uB809\uD1A0\uB9AC\uC758\n \uB8E8\uD2B8 \uB610\uB294 jar \uC544\uCE74\uC774\uBE0C \uC790\uCCB4\uC758 \uB8E8\uD2B8\uC5D0 \uC704\uCE58\uD55C \uACBD\uC6B0 \uBAA8\uB4C8\uD615 jar\uC785\uB2C8\uB2E4.\n \uB2E4\uC74C \uC791\uC5C5\uC740 \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C\n \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C\uB9CC \uC801\uD569\uD569\uB2C8\uB2E4. '--module-version',\n '--hash-modules' \uBC0F '--module-path'.\n\n long \uC635\uC158\uC758 \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801 \uC778\uC218\uB294 \uD574\uB2F9\uD558\uB294 short \uC635\uC158\uC5D0 \uB300\uD574\uC11C\uB3C4\n \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801\uC785\uB2C8\uB2E4.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=op\u00E7\u00E3o n\u00E3o reconhecida : {0}
 error.missing.arg=a op\u00E7\u00E3o {0}  exige um argumento
 error.bad.file.arg=Erro ao fazer parsing dos argumentos de arquivo
-error.bad.option=Uma das op\u00E7\u00F5es -{ctxu} deve ser especificada.
+error.bad.option=Uma das op\u00E7\u00F5es -{ctxuid} deve ser especificada.
 error.bad.cflag=flag 'c' requer que os arquivos de manifesto ou entrada sejam especificados!
 error.bad.uflag=o flag 'u' requer que arquivos de manifesto, o flag 'e' ou arquivos de entrada sejam especificados!
 error.bad.eflag=o flag 'e' e manifesto com o atributo 'Main-Class' n\u00E3o podem ser especificados \njuntos!
-error.bad.dflag=A op\u00E7\u00E3o ''-d, --print-module-descriptor'' n\u00E3o exige a especifica\u00E7\u00E3o de arquivo de sa\u00EDda: {0}
+error.bad.dflag=A op\u00E7\u00E3o '-d, --describe-module' n\u00E3o exige a especifica\u00E7\u00E3o de arquivos de entrada
 error.bad.reason=motivo incorreto: {0}, deve ser deprecated, deprecated-for-removal ou incubating
 error.nosuch.fileordir={0} : n\u00E3o h\u00E1 tal arquivo ou diret\u00F3rio
 error.write.file=Erro ao gravar o arquivo jar existente
@@ -42,16 +42,11 @@
 error.create.tempfile=N\u00E3o foi poss\u00EDvel criar um arquivo tempor\u00E1rio
 error.hash.dep=M\u00F3dulo de hashing com {0} depend\u00EAncias. N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00F3dulo {1} no caminho do m\u00F3dulo
 error.module.options.without.info=Um dentre --module-version ou --hash-modules est\u00E1 sem module-info.class
+error.no.operative.descriptor=Nenhum descritor de opera\u00E7\u00E3o para a release: {0}
+error.no.root.descriptor=Nenhum descritor do m\u00F3dulo-raiz, especifique --release
+error.unable.derive.automodule=N\u00E3o \u00E9 poss\u00EDvel obter o descritor do m\u00F3dulo para: {0}
 error.unexpected.module-info=Descritor de m\u00F3dulo inesperado {0}
 error.module.descriptor.not.found=Descritor de m\u00F3dulo n\u00E3o encontrado
-error.validator.info.without.root=module-info.class encontrado em um diret\u00F3rio com controle de vers\u00E3o sem module-info.class na raiz
-error.validator.info.name.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m nome incorreto
-error.validator.info.requires.transitive=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires transitive" adicional
-error.validator.info.requires.added=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires" adicional
-error.validator.info.requires.dropped=module-info.class em um diret\u00F3rio com controle de vers\u00E3o falta "requires"
-error.validator.info.exports.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "exports" diferente
-error.validator.info.opens.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "opens" diferente
-error.validator.info.provides.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "provides" diferente
 error.invalid.versioned.module.attribute=Atributo {0} de descritor de m\u00F3dulo inv\u00E1lido
 error.missing.provider=Prestador de servi\u00E7os  n\u00E3o encontrado: {0}
 error.release.value.notnumber=release {0} n\u00E3o v\u00E1lida
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=a entrada {0} tem uma vers\u00E3o de classe incompat\u00EDvel com uma vers\u00E3o anterior
 error.validator.different.api=a entrada {0} cont\u00E9m uma classe com api diferente da vers\u00E3o anterior
 error.validator.names.mismatch=a entrada {0} cont\u00E9m uma classe com o nome interno {1}; os nomes n\u00E3o correspondem
+error.validator.info.name.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m nome incorreto
+error.validator.info.requires.transitive=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires transitive" adicional
+error.validator.info.requires.added=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "requires" adicional
+error.validator.info.requires.dropped=module-info.class em um diret\u00F3rio com controle de vers\u00E3o falta "requires"
+error.validator.info.exports.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "exports" diferente
+error.validator.info.opens.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "opens" diferente
+error.validator.info.provides.notequal=module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "provides" diferente
+error.validator.info.version.notequal={0}: module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "version" diferente
+error.validator.info.manclass.notequal={0}: module-info.class em um diret\u00F3rio com controle de vers\u00E3o cont\u00E9m "main-class" diferente
 warn.validator.identical.entry=Advert\u00EAncia: a entrada {0} cont\u00E9m uma classe\nid\u00EAntica a uma que j\u00E1 est\u00E1 no jar
 warn.validator.resources.with.same.name=Advert\u00EAncia: entrada {0}; diversos recursos com o mesmo nome
 warn.validator.concealed.public.class=Advert\u00EAncia: a entrada {0} \u00E9 uma classe p\u00FAblica\nem um pacote oculto; colocar esse jar no caminho de classe resultar\u00E1\nem interfaces p\u00FAblicas incompat\u00EDveis
+warn.release.unexpected.versioned.entry=entrada {0} com controle de vers\u00E3o inesperada
 out.added.manifest=manifesto adicionado
 out.added.module-info=module-info: {0} adicionado
+out.automodule=Nenhum descritor de m\u00F3dulo encontrado. M\u00F3dulo autom\u00E1tico derivado.
 out.update.manifest=manifesto atualizado
 out.update.module-info=module-info: {0} atualizado
 out.ignore.entry=ignorando entrada {0}
@@ -88,17 +94,19 @@
 main.usage.summary=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=Tente `jar --ajuda' para obter mais informa\u00E7\u00F5es.
 
-main.help.preopt=Uso: jar [OPTION...] [ [--release VERSION] [-C dir] arquivos]...\njar cria um arquivo compactado para classes e recursos, e pode manipular ou\nrestaurar classes ou recursos individuais de um arquivo compactado.\n\n Exemplos:\n # Cria um arquivo compactado chamado classes.jar com dois arquivos de classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Cria um arquivo compactado usando um manifesto existente, com todos os arquivos em foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cria um arquivo compactado jar modular, em que o descritor do m\u00F3dulo se localize em\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Atualiza um arquivo jar n\u00E3o modular existente para um jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Cria um arquivo jar de v\u00E1rias releases, colocando alguns arquivos no diret\u00F3rio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Uso: arquivos [OPTION...] [ [--release VERSION] [-C dir] jar]...\njar cria um arquivo compactado para classes e recursos, e pode manipular ou\nrestaurar classes ou recursos individuais de um arquivo compactado.\n\n Exemplos:\n # Cria um arquivo compactado chamado classes.jar com dois arquivos de classe:\n jar --create --file classes.jar Foo.class Bar.class\n # Cria um arquivo compactado usando um manifesto existente, com todos os arquivos em foo/:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Cria um arquivo compactado jar modular, em que o descritor do m\u00F3dulo se localiza em\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Atualiza um arquivo jar n\u00E3o modular existente para um jar modular:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Cria um arquivo jar de v\u00E1rias releases, colocando alguns arquivos no diret\u00F3rio META-INF/versions/9:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nPara reduzir ou simplificar o comando jar, voc\u00EA pode especificar argumentos em um arquivo de texto separado\ne especific\u00E1-lo no comando jar com o sinal de arroba (@) como um prefixo.\n\n Exemplos:\n # L\u00EA op\u00E7\u00F5es adicionais e lista os arquivos de classe do arquivo classes.list\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ Modo de opera\u00E7\u00E3o principal:\n
 main.help.opt.main.create=\  -c, --create               Cria o arquivo compactado
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  Gera informa\u00E7\u00F5es de \u00EDndice para os arquivos compactados jar \n                             especificados
 main.help.opt.main.list=\  -t, --list                 Lista o conte\u00FAdo do arquivo compactado
 main.help.opt.main.update=\  -u, --update               Atualiza um arquivo compactado jar existente
 main.help.opt.main.extract=\  -x, --extract              Extrai arquivos nomeados (ou todos) do arquivo compactado
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  Imprimir o descritor de m\u00F3dulo
+main.help.opt.main.describe-module=\  -d, --describe-module      Imprime o descritor do m\u00F3dulo ou nome do m\u00F3dulo autom\u00E1tico
 main.help.opt.any=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos em qualquer modo:\n\n  -C DIR                     Altera para o diret\u00F3rio especificado e inclui o\n                             seguinte arquivo:
-main.help.opt.any.file=\  -f, --file=FILE            O nome do arquivo compactado\n      --release VERSION      Coloca todos os arquivos a seguir em um diret\u00F3rio com controle de vers\u00E3o\n                             do arquivo jar (i.e. META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            O nome do arquivo compactado. Quando omitido, stdin ou\n                             stdout ser\u00E1 usado com base na opera\u00E7\u00E3o\n      --release VERSION      Coloca todos os arquivos a seguir em um diret\u00F3rio com controle de vers\u00E3o\n                             do arquivo jar (i.e. META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              Gera sa\u00EDda detalhada na sa\u00EDda padr\u00E3o
+main.help.opt.create=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o:\n
+main.help.opt.create.normalize=\  -n, --normalize            Normaliza as informa\u00E7\u00F5es no novo arquivo compactado jar\n                             ap\u00F3s a cria\u00E7\u00E3o
 main.help.opt.create.update=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o e atualiza\u00E7\u00E3o:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME O ponto de entrada do aplicativo para aplicativos\n                             stand-alone empacotados em um arquivo compactado jar modular\n                             ou execut\u00E1vel
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Inclui as informa\u00E7\u00F5es de manifesto provenientes do arquivo de\n                             manifesto em quest\u00E3o
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o, atualiza\u00E7\u00E3o e gera\u00E7\u00E3o de \u00EDndice:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Somente armazenamento; n\u00E3o use compacta\u00E7\u00E3o ZIP
 main.help.opt.other=\ Outras op\u00E7\u00F5es:\n
-main.help.opt.other.help=\  -?, --help[:compat]        Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade
+main.help.opt.other.help=\  -h, --help[:compat]        Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade
 main.help.opt.other.help-extra=\      --help-extra           Fornecer ajuda sobre op\u00E7\u00F5es extras
 main.help.opt.other.version=\      --version              Imprime a vers\u00E3o do programa
 main.help.postopt=\ Arquivo compactado ser\u00E1 um arquivo jar modular se um descritor de m\u00F3dulo, 'module-info.class', estiver\n localizado na raiz dos diret\u00F3rios em quest\u00E3o ou na raiz do pr\u00F3prio arquivo compactado\n jar. As seguintes opera\u00E7\u00F5es s\u00F3 s\u00E3o v\u00E1lidas ao criar um jar modular\n ou atualizar um jar n\u00E3o modular existente: '--module-version',\n '--hash-modules' e '--module-path'.\n\n Argumentos obrigat\u00F3rios ou opcionais para op\u00E7\u00F5es longas tamb\u00E9m s\u00E3o obrigat\u00F3rios ou opcionais\n para quaisquer op\u00E7\u00F5es curtas correspondentes.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,29 +29,24 @@
 error.unrecognized.option=ok\u00E4nt alternativ: {0}
 error.missing.arg=alternativet {0} kr\u00E4ver ett argument
 error.bad.file.arg=Fel vid tolkning av filargument
-error.bad.option=Ett av alternativen -{ctxu} m\u00E5ste anges.
+error.bad.option=Ett av alternativen -{ctxuid} m\u00E5ste anges.
 error.bad.cflag=f\u00F6r c-flaggan m\u00E5ste manifest- eller indatafiler anges.
 error.bad.uflag=f\u00F6r u-flaggan m\u00E5ste manifest-, e-flagg- eller indatafiler anges.
 error.bad.eflag=e-flaggan och manifest med attributet Main-Class kan inte anges \ntillsammans.
-error.bad.dflag=alternativet ''-d, --print-module-descriptor'' kr\u00E4ver att inga indatafiler har angetts: {0}
+error.bad.dflag=alternativet '-d, --describe-module' kr\u00E4ver att ingen indatafil anges
 error.bad.reason=ogiltig orsak: {0} m\u00E5ste vara deprecated, deprecated-for-removal eller incubating
 error.nosuch.fileordir={0} : det finns ingen s\u00E5dan fil eller katalog
-error.write.file=Det uppstod ett fel vid skrivning till befintlig jar-fil.
+error.write.file=Ett fel intr\u00E4ffade vid skrivning till befintlig jar-fil.
 error.create.dir={0} : kunde inte skapa n\u00E5gon katalog
 error.incorrect.length=ogiltig l\u00E4ngd vid bearbetning: {0}
 error.create.tempfile=Kunde inte skapa en tillf\u00E4llig fil
 error.hash.dep={0}-beroenden f\u00F6r hashningsmodulen, kan inte hitta modulen {1} p\u00E5 moduls\u00F6kv\u00E4gen
 error.module.options.without.info=--module-version eller --hash-modules utan module-info.class
+error.no.operative.descriptor=Ingen operativ deskriptor f\u00F6r utg\u00E5van: {0}
+error.no.root.descriptor=Ingen rotmoduldeskriptor, ange --release
+error.unable.derive.automodule=Kan inte h\u00E4rleda moduldeskriptor f\u00F6r: {0}
 error.unexpected.module-info=Ov\u00E4ntad moduldeskriptor, {0}
 error.module.descriptor.not.found=Moduldeskriptorn hittades inte
-error.validator.info.without.root=module-info.class hittades i en versionshanterad katalog utan module-info.class i roten
-error.validator.info.name.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller ett felaktigt namn
-error.validator.info.requires.transitive=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires transitive"
-error.validator.info.requires.added=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires"
-error.validator.info.requires.dropped=module-info.class i en versionshanterad katalog inneh\u00E5ller saknade "requires"
-error.validator.info.exports.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "exports"
-error.validator.info.opens.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "opens"
-error.validator.info.provides.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "provides"
 error.invalid.versioned.module.attribute=Ogiltigt attribut f\u00F6r moduldeskriptor, {0}
 error.missing.provider=Tj\u00E4nsteleverant\u00F6ren hittades inte: {0}
 error.release.value.notnumber=utg\u00E5va {0} \u00E4r inte giltig
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=posten {0} har en klassversion som \u00E4r inkompatibel med en tidigare version
 error.validator.different.api=posten {0} inneh\u00E5ller en klass med ett annat api fr\u00E5n en tidigare version
 error.validator.names.mismatch=posten {0} inneh\u00E5ller en klass med det interna namnet {1}, namnen matchar inte
+error.validator.info.name.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller ett felaktigt namn
+error.validator.info.requires.transitive=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires transitive"
+error.validator.info.requires.added=module-info.class i en versionshanterad katalog inneh\u00E5ller fler "requires"
+error.validator.info.requires.dropped=module-info.class i en versionshanterad katalog inneh\u00E5ller saknade "requires"
+error.validator.info.exports.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "exports"
+error.validator.info.opens.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "opens"
+error.validator.info.provides.notequal=module-info.class i en versionshanterad katalog inneh\u00E5ller olika "provides"
+error.validator.info.version.notequal={0}: module-info.class i en versionshanterad katalog inneh\u00E5ller olika "version"
+error.validator.info.manclass.notequal={0}: module-info.class i en versionshanterad katalog inneh\u00E5ller olika "main-class"
 warn.validator.identical.entry=Varning: posten {0} inneh\u00E5ller en klass som\n\u00E4r identisk med en post som redan finns i jar-filen
 warn.validator.resources.with.same.name=Varning: posten {0}, flera resurser med samma namn
 warn.validator.concealed.public.class=Varning: posten {0} \u00E4r en allm\u00E4n klass\ni ett dolt paket. Om du placerar den h\u00E4r jar-filen p\u00E5 klass\u00F6kv\u00E4gen leder\ndet till inkompatibla allm\u00E4nna gr\u00E4nssnitt
+warn.release.unexpected.versioned.entry=ov\u00E4ntad versionshanterad post, {0}
 out.added.manifest=tillagt manifestfil
 out.added.module-info=lade till module-info: {0}
+out.automodule=Ingen moduldeskriptor hittades. H\u00E4rledd automatisk modul.
 out.update.manifest=uppdaterat manifest
 out.update.module-info=uppdaterade module-info: {0}
 out.ignore.entry=ignorerar posten {0}
@@ -88,17 +94,19 @@
 main.usage.summary=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=F\u00F6rs\u00F6k med 'jar --help' f\u00F6r mer information.
 
-main.help.preopt=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar skapar ett arkiv f\u00F6r klasser och resurser, och kan \u00E4ndra och \u00E5terst\u00E4lla\nenskilda klasser och resurser fr\u00E5n ett arkiv.\n\n Exempel:\n # Skapa ett arkiv med namnet classes.jar med tv\u00E5 klassfiler:\n jar --create --file classes.jar Foo.class Bar.class\n # Skapa ett arkiv med ett befintligt manifest med alla filerna i 'foo/':\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Skapa ett modul\u00E4rt jar-arkiv, d\u00E4r moduldeskriptorn finns i\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Uppdatera ett befintligt icke-modul\u00E4rt jar-arkiv till ett modul\u00E4rt jar-arkiv:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Skapa ett jar-arkiv f\u00F6r flera utg\u00E5vor och placera vissa av filerna i katalogen 'META-INF/versions/9':\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=Syntax: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar skapar ett arkiv f\u00F6r klasser och resurser, och kan \u00E4ndra och \u00E5terst\u00E4lla\nenskilda klasser och resurser fr\u00E5n ett arkiv.\n\n Exempel:\n # Skapa ett arkiv med namnet classes.jar med tv\u00E5 klassfiler:\n jar --create --file classes.jar Foo.class Bar.class\n # Skapa ett arkiv med ett befintligt manifest med alla filerna i 'foo/':\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # Skapa ett modul\u00E4rt jar-arkiv, d\u00E4r moduldeskriptorn finns i\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # Uppdatera ett befintligt icke-modul\u00E4rt jar-arkiv till ett modul\u00E4rt jar-arkiv:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # Skapa ett jar-arkiv f\u00F6r flera utg\u00E5vor och placera vissa av filerna i katalogen 'META-INF/versions/9':\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\nOm du vill f\u00F6rkorta eller f\u00F6renkla kommandot jar kan du ange argument i en separat\ntextfil och \u00F6verf\u00F6ra den med tecknet '@' som prefix.\n\n Exempel:\n # L\u00E4s ytterligare alternativ och en lista \u00F6ver klassfiler fr\u00E5n filen 'classes.list'\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ Huvudfunktionsl\u00E4ge:\n
 main.help.opt.main.create=\  -c, --create               Skapa arkivet
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  Generera indexinformation f\u00F6r de angivna jar-\n                             arkiven
 main.help.opt.main.list=\  -t, --list                 Listar inneh\u00E5llsf\u00F6rteckningen f\u00F6r arkivet
 main.help.opt.main.update=\  -u, --update               Uppdatera ett befintligt jar-arkiv
 main.help.opt.main.extract=\  -x, --extract              Extrahera namngivna (eller alla) filer fr\u00E5n arkivet
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  Skriv ut moduldeskriptorn
+main.help.opt.main.describe-module=\  -d, --describe-module      Skriv ut moduldeskriptorn eller det automatiska modulnamnet
 main.help.opt.any=\ \u00C5tg\u00E4rdsmodifierare som \u00E4r giltiga i alla l\u00E4gen:\n\n  -C DIR                     \u00C4ndra till den angivna katalogen och inkludera\n                             f\u00F6ljande fil
-main.help.opt.any.file=\  -f, --file=FILE            Namnet p\u00E5 arkivfilen\n      --release VERSION      Placerar alla f\u00F6ljande filer i en versionshanterad katalog\n                             i jar-arkivet (exempel: META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            Namnet p\u00E5 arkivfilen. N\u00E4r det utel\u00E4mnas anv\u00E4nds stdin eller\n                             stdout beroende p\u00E5 \u00E5tg\u00E4rden\n      --release VERSION      Placerar alla f\u00F6ljande filer i en versionshanterad katalog\n                             i jar-filen (t.ex. META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              Generera utf\u00F6rliga utdata till standardutdata
+main.help.opt.create=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4get create:\n
+main.help.opt.create.normalize=\  -n, --normalize            Normalisera informationen i det nya jar-arkivet\n                             n\u00E4r det har skapats
 main.help.opt.create.update=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4gena create och update:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME Applikationsing\u00E5ngspunkten f\u00F6r frist\u00E5ende\n                             applikationer paketerad i ett modul\u00E4rt, eller k\u00F6rbart,\n                             jar-arkiv
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Inkludera manifestinformationen fr\u00E5n den angivna\n                             manifestfilen
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4gena create, update och generate-index:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          Endast lagring, anv\u00E4nd ingen ZIP-komprimering
 main.help.opt.other=\ \u00D6vriga alternativ:\n
-main.help.opt.other.help=\  -?, --help[:compat]        Visa den h\u00E4r hj\u00E4lpen eller kompatibilitetshj\u00E4lpen (valfritt)
+main.help.opt.other.help=\  -h, --help[:compat]        Visa den h\u00E4r hj\u00E4lpen eller kompatibilitetshj\u00E4lpen (valfritt)
 main.help.opt.other.help-extra=\      --help-extra           Visa hj\u00E4lp f\u00F6r extra alternativ
 main.help.opt.other.version=\      --version              Skriv ut programversion
 main.help.postopt=\ Ett arkiv \u00E4r ett modul\u00E4rt jar-arkiv om en moduldeskriptor, 'module-info.class',\n finns i roten av de angivna katalogerna eller det angivna jar-arkivet.\n F\u00F6ljande \u00E5tg\u00E4rder \u00E4r endast giltiga vid skapande av ett modul\u00E4rt jar-arkiv och\n vid uppdatering av ett befintligt icke-modul\u00E4rt jar-arkiv: '--module-version',\n '--hash-modules' och '--module-path'.\n\n Obligatoriska och valfria alternativ f\u00F6r l\u00E5nga alternativ \u00E4r \u00E4ven obligatoriska\n respektive valfria f\u00F6r alla motsvarande korta alternativ.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=\u65E0\u6CD5\u8BC6\u522B\u7684\u9009\u9879: {0}
 error.missing.arg=\u9009\u9879{0}\u9700\u8981\u53C2\u6570
 error.bad.file.arg=\u89E3\u6790\u6587\u4EF6\u53C2\u6570\u65F6\u51FA\u9519
-error.bad.option=\u5FC5\u987B\u6307\u5B9A {ctxu} \u4E2D\u7684\u4EFB\u4E00\u9009\u9879\u3002
+error.bad.option=\u5FC5\u987B\u6307\u5B9A {ctxuid} \u4E2D\u7684\u4EFB\u4E00\u9009\u9879\u3002
 error.bad.cflag='c' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355\u6216\u8F93\u5165\u6587\u4EF6!
 error.bad.uflag='u' \u6807\u8BB0\u8981\u6C42\u6307\u5B9A\u6E05\u5355, 'e' \u6807\u8BB0\u6216\u8F93\u5165\u6587\u4EF6!
 error.bad.eflag=\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A 'e' \u6807\u8BB0\u548C\u5177\u6709 'Main-Class' \u5C5E\u6027\u7684\n\u6E05\u5355!
-error.bad.dflag=''-d, --print-module-descriptor'' \u9009\u9879\u4E0D\u9700\u8981\u6307\u5B9A\u4EFB\u4F55\u8F93\u5165\u6587\u4EF6: {0}
+error.bad.dflag='-d, --describe-module' \u9009\u9879\u4E0D\u9700\u8981\u6307\u5B9A\u4EFB\u4F55\u8F93\u5165\u6587\u4EF6
 error.bad.reason=\u9519\u8BEF\u7684\u539F\u56E0: {0}, \u5FC5\u987B\u4E3A deprecated, deprecated-for-removal \u6216 incubating \u4E4B\u4E00
 error.nosuch.fileordir={0}: \u6CA1\u6709\u8FD9\u4E2A\u6587\u4EF6\u6216\u76EE\u5F55
 error.write.file=\u5199\u5165\u73B0\u6709\u7684 jar \u6587\u4EF6\u65F6\u51FA\u9519
@@ -42,16 +42,11 @@
 error.create.tempfile=\u65E0\u6CD5\u521B\u5EFA\u4E34\u65F6\u6587\u4EF6
 error.hash.dep=\u6B63\u5728\u5BF9\u6A21\u5757 {0} \u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u6267\u884C\u6563\u5217\u5904\u7406, \u5728\u6A21\u5757\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u6A21\u5757 {1}
 error.module.options.without.info=--module-version \u6216 --hash-modules \u4E4B\u4E00\u6CA1\u6709 module-info.class
+error.no.operative.descriptor=\u6CA1\u6709\u53D1\u884C\u7248\u7684\u6709\u6548\u63CF\u8FF0\u7B26: {0}
+error.no.root.descriptor=\u6CA1\u6709\u6839\u6A21\u5757\u63CF\u8FF0\u7B26, \u8BF7\u6307\u5B9A --release
+error.unable.derive.automodule=\u65E0\u6CD5\u6D3E\u751F {0} \u7684\u6A21\u5757\u63CF\u8FF0\u7B26
 error.unexpected.module-info=\u610F\u5916\u7684\u6A21\u5757\u63CF\u8FF0\u7B26 {0}
 error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26
-error.validator.info.without.root=\u5728\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u627E\u5230\u4E86 module-info.class, \u4F46\u6839\u4E2D\u6CA1\u6709 module-info.class
-error.validator.info.name.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u786E\u7684\u540D\u79F0
-error.validator.info.requires.transitive=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires transitive"
-error.validator.info.requires.added=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires"
-error.validator.info.requires.dropped=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u7F3A\u5C11\u7684 "requires"
-error.validator.info.exports.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
-error.validator.info.opens.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
-error.validator.info.provides.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
 error.invalid.versioned.module.attribute=\u65E0\u6548\u7684\u6A21\u5757\u63CF\u8FF0\u7B26\u5C5E\u6027 {0}
 error.missing.provider=\u672A\u627E\u5230\u670D\u52A1\u63D0\u4F9B\u65B9: {0}
 error.release.value.notnumber=\u53D1\u884C\u7248 {0} \u65E0\u6548
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=\u6761\u76EE {0} \u5305\u542B\u4E0E\u8F83\u65E9\u7248\u672C\u4E0D\u517C\u5BB9\u7684\u7C7B\u7248\u672C
 error.validator.different.api=\u6761\u76EE {0} \u5305\u542B\u7684\u7C7B\u5177\u6709\u4E0E\u65E9\u671F\u7248\u672C\u4E0D\u540C\u7684 api
 error.validator.names.mismatch=\u6761\u76EE {0} \u5305\u542B\u5185\u90E8\u540D\u79F0\u4E3A {1} \u7684\u7C7B, \u540D\u79F0\u4E0D\u5339\u914D
+error.validator.info.name.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u786E\u7684\u540D\u79F0
+error.validator.info.requires.transitive=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires transitive"
+error.validator.info.requires.added=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 "requires"
+error.validator.info.requires.dropped=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u7F3A\u5C11\u7684 "requires"
+error.validator.info.exports.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
+error.validator.info.opens.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
+error.validator.info.provides.notequal=\u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
+error.validator.info.version.notequal={0}: \u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "version"
+error.validator.info.manclass.notequal={0}: \u7248\u672C\u5316\u76EE\u5F55\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "main-class"
 warn.validator.identical.entry=\u8B66\u544A: \u6761\u76EE {0} \u5305\u542B\u4E0E jar \u4E2D\u7684\n\u73B0\u6709\u6761\u76EE\u76F8\u540C\u7684\u7C7B
 warn.validator.resources.with.same.name=\u8B66\u544A: \u6761\u76EE {0}, \u591A\u4E2A\u8D44\u6E90\u5177\u6709\u76F8\u540C\u540D\u79F0
 warn.validator.concealed.public.class=\u8B66\u544A: \u6761\u76EE {0} \u662F\u5DF2\u9690\u85CF\u7A0B\u5E8F\u5305\u4E2D\u7684\n\u516C\u5171\u7C7B, \u5C06\u6B64 jar \u653E\u7F6E\u5728\u7C7B\u8DEF\u5F84\u4E2D\n\u5C06\u5BFC\u81F4\u516C\u5171\u63A5\u53E3\u4E0D\u517C\u5BB9
+warn.release.unexpected.versioned.entry=\u610F\u5916\u7684\u7248\u672C\u5316\u6761\u76EE {0}
 out.added.manifest=\u5DF2\u6DFB\u52A0\u6E05\u5355
 out.added.module-info=\u5DF2\u6DFB\u52A0 module-info: {0}
+out.automodule=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26\u3002\u5DF2\u6D3E\u751F\u81EA\u52A8\u6A21\u5757\u3002
 out.update.manifest=\u5DF2\u66F4\u65B0\u6E05\u5355
 out.update.module-info=\u5DF2\u66F4\u65B0 module-info: {0}
 out.ignore.entry=\u6B63\u5728\u5FFD\u7565\u6761\u76EE{0}
@@ -88,17 +94,19 @@
 main.usage.summary=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=\u5C1D\u8BD5\u4F7F\u7528 `jar --help' \u83B7\u53D6\u8BE6\u7EC6\u4FE1\u606F\u3002
 
-main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u521B\u5EFA\u7C7B\u548C\u8D44\u6E90\u7684\u6863\u6848, \u5E76\u4E14\u53EF\u4EE5\u5904\u7406\u6863\u6848\u4E2D\u7684\n\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u6216\u8005\u4ECE\u6863\u6848\u4E2D\u8FD8\u539F\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u3002\n\n \u793A\u4F8B:\n # \u521B\u5EFA\u5305\u542B\u4E24\u4E2A\u7C7B\u6587\u4EF6\u7684\u540D\u4E3A classes.jar \u7684\u6863\u6848:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u521B\u5EFA\u6863\u6848, \u5176\u4E2D\u5305\u542B foo/ \u4E2D\u7684\u6240\u6709\u6587\u4EF6:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u521B\u5EFA\u6A21\u5757\u5316 jar \u6863\u6848, \u5176\u4E2D\u6A21\u5757\u63CF\u8FF0\u7B26\u4F4D\u4E8E\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \u5C06\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u66F4\u65B0\u4E3A\u6A21\u5757\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \u521B\u5EFA\u5305\u542B\u591A\u4E2A\u53D1\u884C\u7248\u7684 jar, \u5E76\u5C06\u4E00\u4E9B\u6587\u4EF6\u653E\u5728 META-INF/versions/9 \u76EE\u5F55\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u521B\u5EFA\u7C7B\u548C\u8D44\u6E90\u7684\u6863\u6848, \u5E76\u4E14\u53EF\u4EE5\u5904\u7406\u6863\u6848\u4E2D\u7684\n\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u6216\u8005\u4ECE\u6863\u6848\u4E2D\u8FD8\u539F\u5355\u4E2A\u7C7B\u6216\u8D44\u6E90\u3002\n\n \u793A\u4F8B:\n # \u521B\u5EFA\u5305\u542B\u4E24\u4E2A\u7C7B\u6587\u4EF6\u7684\u540D\u4E3A classes.jar \u7684\u6863\u6848:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73B0\u6709\u7684\u6E05\u5355\u521B\u5EFA\u6863\u6848, \u5176\u4E2D\u5305\u542B foo/ \u4E2D\u7684\u6240\u6709\u6587\u4EF6:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u521B\u5EFA\u6A21\u5757\u5316 jar \u6863\u6848, \u5176\u4E2D\u6A21\u5757\u63CF\u8FF0\u7B26\u4F4D\u4E8E\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \u5C06\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u66F4\u65B0\u4E3A\u6A21\u5757\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \u521B\u5EFA\u5305\u542B\u591A\u4E2A\u53D1\u884C\u7248\u7684 jar, \u5E76\u5C06\u4E00\u4E9B\u6587\u4EF6\u653E\u5728 META-INF/versions/9 \u76EE\u5F55\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\n\u8981\u7F29\u77ED\u6216\u7B80\u5316 jar \u547D\u4EE4, \u53EF\u4EE5\u5728\u5355\u72EC\u7684\u6587\u672C\u6587\u4EF6\u4E2D\u6307\u5B9A\u53C2\u6570,\n\u5E76\u4F7F\u7528 @ \u7B26\u53F7\u4F5C\u4E3A\u524D\u7F00\u5C06\u6B64\u6587\u4EF6\u4F20\u9012\u7ED9 jar \u547D\u4EE4\u3002\n\n \u793A\u4F8B:\n # \u4ECE\u6587\u4EF6 classes.list \u8BFB\u53D6\u9644\u52A0\u9009\u9879\u548C\u7C7B\u6587\u4EF6\u5217\u8868\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ \u4E3B\u64CD\u4F5C\u6A21\u5F0F:\n
 main.help.opt.main.create=\  -c, --create               \u521B\u5EFA\u6863\u6848
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  \u4E3A\u6307\u5B9A\u7684 jar \u6863\u6848\u751F\u6210\n                             \u7D22\u5F15\u4FE1\u606F
 main.help.opt.main.list=\  -t, --list                 \u5217\u51FA\u6863\u6848\u7684\u76EE\u5F55
 main.help.opt.main.update=\  -u, --update               \u66F4\u65B0\u73B0\u6709 jar \u6863\u6848
 main.help.opt.main.extract=\  -x, --extract              \u4ECE\u6863\u6848\u4E2D\u63D0\u53D6\u6307\u5B9A\u7684 (\u6216\u5168\u90E8) \u6587\u4EF6
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  \u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26
+main.help.opt.main.describe-module=\  -d, --describe-module      \u8F93\u51FA\u6A21\u5757\u63CF\u8FF0\u7B26\u6216\u81EA\u52A8\u6A21\u5757\u540D\u79F0
 main.help.opt.any=\ \u5728\u4EFB\u610F\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n\n  -C DIR                     \u66F4\u6539\u4E3A\u6307\u5B9A\u7684\u76EE\u5F55\u5E76\u5305\u542B\n                             \u4EE5\u4E0B\u6587\u4EF6
-main.help.opt.any.file=\  -f, --file=FILE            \u6863\u6848\u6587\u4EF6\u540D\n      --release VERSION      \u5C06\u4E0B\u9762\u7684\u6240\u6709\u6587\u4EF6\u90FD\u653E\u5728\n                             jar \u7684\u7248\u672C\u5316\u76EE\u5F55\u4E2D (\u5373 META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            \u6863\u6848\u6587\u4EF6\u540D\u3002\u7701\u7565\u65F6, \u57FA\u4E8E\u64CD\u4F5C\n                             \u4F7F\u7528 stdin \u6216 stdout\n      --release VERSION      \u5C06\u4E0B\u9762\u7684\u6240\u6709\u6587\u4EF6\u90FD\u653E\u5728\n                             jar \u7684\u7248\u672C\u5316\u76EE\u5F55\u4E2D (\u5373 META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              \u5728\u6807\u51C6\u8F93\u51FA\u4E2D\u751F\u6210\u8BE6\u7EC6\u8F93\u51FA
+main.help.opt.create=\ \u4EC5\u5728\u521B\u5EFA\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
+main.help.opt.create.normalize=\  -n, --normalize            \u521B\u5EFA\u540E\u5728\u65B0\u7684 jar \u6863\u6848\u4E2D\n                             \u89C4\u8303\u5316\u4FE1\u606F
 main.help.opt.create.update=\ \u5728\u521B\u5EFA\u548C\u66F4\u65B0\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME \u6346\u7ED1\u5230\u6A21\u5757\u5316\u6216\u53EF\u6267\u884C \n                             jar \u6863\u6848\u7684\u72EC\u7ACB\u5E94\u7528\u7A0B\u5E8F\n                             \u7684\u5E94\u7528\u7A0B\u5E8F\u5165\u53E3\u70B9
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\n                             \u6E05\u5355\u4FE1\u606F
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ \u53EA\u5728\u521B\u5EFA, \u66F4\u65B0\u548C\u751F\u6210\u7D22\u5F15\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          \u4EC5\u5B58\u50A8; \u4E0D\u4F7F\u7528 ZIP \u538B\u7F29
 main.help.opt.other=\ \u5176\u4ED6\u9009\u9879:\n
-main.help.opt.other.help=\  -?, --help[:compat]        \u63D0\u4F9B\u6B64\u5E2E\u52A9, \u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9
+main.help.opt.other.help=\  -h, --help[:compat]        \u63D0\u4F9B\u6B64\u5E2E\u52A9, \u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9
 main.help.opt.other.help-extra=\      --help-extra           \u63D0\u4F9B\u989D\u5916\u9009\u9879\u7684\u5E2E\u52A9
 main.help.opt.other.version=\      --version              \u8F93\u51FA\u7A0B\u5E8F\u7248\u672C
 main.help.postopt=\ \u5982\u679C\u6A21\u5757\u63CF\u8FF0\u7B26 'module-info.class' \u4F4D\u4E8E\u6307\u5B9A\u76EE\u5F55\u7684\n \u6839\u76EE\u5F55\u4E2D, \u6216\u8005\u4F4D\u4E8E jar \u6863\u6848\u672C\u8EAB\u7684\u6839\u76EE\u5F55\u4E2D, \u5219\n \u8BE5\u6863\u6848\u662F\u4E00\u4E2A\u6A21\u5757\u5316 jar\u3002\u4EE5\u4E0B\u64CD\u4F5C\u53EA\u5728\u521B\u5EFA\u6A21\u5757\u5316 jar,\n \u6216\u66F4\u65B0\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u65F6\u6709\u6548: '--module-version',\n '--hash-modules' \u548C '--module-path'\u3002\n\n \u5982\u679C\u4E3A\u957F\u9009\u9879\u63D0\u4F9B\u4E86\u5FC5\u9700\u53C2\u6570\u6216\u53EF\u9009\u53C2\u6570, \u5219\u5B83\u4EEC\u5BF9\u4E8E\n \u4EFB\u4F55\u5BF9\u5E94\u7684\u77ED\u9009\u9879\u4E5F\u662F\u5FC5\u9700\u6216\u53EF\u9009\u7684\u3002
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -29,11 +29,11 @@
 error.unrecognized.option=\u7121\u6CD5\u8FA8\u8B58\u7684\u9078\u9805 : {0}
 error.missing.arg=\u9078\u9805 {0} \u9700\u8981\u4E00\u500B\u5F15\u6578
 error.bad.file.arg=\u5256\u6790\u6A94\u6848\u5F15\u6578\u6642\u767C\u751F\u932F\u8AA4
-error.bad.option=\u5176\u4E2D\u4E00\u500B\u9078\u9805 -{ctxu} \u5FC5\u9808\u52A0\u4EE5\u6307\u5B9A\u3002
+error.bad.option=\u5FC5\u9808\u6307\u5B9A -{ctxuid} \u7684\u5176\u4E2D\u4E00\u500B\u9078\u9805\u3002
 error.bad.cflag='c' \u65D7\u6A19\u8981\u6C42\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u6216\u8F38\u5165\u6A94\u6848\uFF01
 error.bad.uflag='u' \u65D7\u6A19\u8981\u6C42\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u3001'e' \u65D7\u6A19\u6216\u8F38\u5165\u6A94\u6848\uFF01
 error.bad.eflag=\u7121\u6CD5\u540C\u6642\u6307\u5B9A 'e' \u65D7\u6A19\u548C\u5177\u6709 'Main-Class' \u5C6C\u6027\u7684\n\u8CC7\u8A0A\u6E05\u55AE\uFF01
-error.bad.dflag=''-d, --print-module-descriptor'' \u9078\u9805\u4E0D\u9700\u8981\u6307\u5B9A\u8F38\u5165\u6A94: {0}
+error.bad.dflag='-d, --describe-module' \u9078\u9805\u4E0D\u9700\u8981\u6307\u5B9A\u8F38\u5165\u6A94
 error.bad.reason=\u932F\u8AA4\u539F\u56E0: {0}\uFF0C\u5FC5\u9808\u662F deprecated\u3001deprecated-for-removal \u6216 incubating \u5176\u4E2D\u4E4B\u4E00
 error.nosuch.fileordir={0} : \u6C92\u6709\u9019\u985E\u6A94\u6848\u6216\u76EE\u9304
 error.write.file=\u5BEB\u5165\u73FE\u6709\u7684 jar \u6A94\u6848\u6642\u767C\u751F\u932F\u8AA4
@@ -42,16 +42,11 @@
 error.create.tempfile=\u7121\u6CD5\u5EFA\u7ACB\u66AB\u5B58\u6A94\u6848
 error.hash.dep=\u96DC\u6E4A\u6A21\u7D44 {0} \u76F8\u4F9D\u6027\uFF0C\u5728\u6A21\u7D44\u8DEF\u5F91\u4E0A\u627E\u4E0D\u5230\u6A21\u7D44 {1}
 error.module.options.without.info=--module-version \u6216 --hash-modules \u5176\u4E2D\u4E00\u500B\u6C92\u6709 module-info.class
+error.no.operative.descriptor=\u6C92\u6709\u4EE5\u4E0B\u7248\u672C\u7684\u64CD\u4F5C\u63CF\u8FF0\u5340: {0}
+error.no.root.descriptor=\u6C92\u6709\u6839\u6A21\u7D44\u63CF\u8FF0\u5340\uFF0C\u8ACB\u6307\u5B9A --release
+error.unable.derive.automodule=\u7121\u6CD5\u884D\u751F {0} \u7684\u6A21\u7D44\u63CF\u8FF0\u5340
 error.unexpected.module-info=\u672A\u9810\u671F\u7684\u6A21\u7D44\u63CF\u8FF0\u5340 {0}
 error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u7D44\u63CF\u8FF0\u5340
-error.validator.info.without.root=\u5728\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u767C\u73FE module-info.class\uFF0C\u4F46\u662F\u6839\u4E2D\u6C92\u6709 module-info.class
-error.validator.info.name.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u78BA\u7684\u540D\u7A31
-error.validator.info.requires.transitive=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires transitive"
-error.validator.info.requires.added=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires"
-error.validator.info.requires.dropped=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u907A\u6F0F\u7684 "requires"
-error.validator.info.exports.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
-error.validator.info.opens.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
-error.validator.info.provides.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
 error.invalid.versioned.module.attribute=\u6A21\u7D44\u63CF\u8FF0\u5340\u5C6C\u6027 {0} \u7121\u6548
 error.missing.provider=\u627E\u4E0D\u5230\u670D\u52D9\u63D0\u4F9B\u8005: {0}
 error.release.value.notnumber=\u7248\u672C {0} \u7121\u6548
@@ -67,11 +62,22 @@
 error.validator.incompatible.class.version=\u9805\u76EE {0} \u7684\u985E\u5225\u7248\u672C\u8207\u8F03\u820A\u7248\u672C\u4E0D\u76F8\u5BB9
 error.validator.different.api=\u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\u542B\u6709\u8207\u8F03\u820A\u7248\u672C\u4E0D\u540C\u7684 API
 error.validator.names.mismatch=\u9805\u76EE {0} \u542B\u6709\u5167\u90E8\u540D\u7A31\u70BA {1} \u7684\u985E\u5225\uFF0C\u540D\u7A31\u4E0D\u76F8\u7B26
+error.validator.info.name.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u78BA\u7684\u540D\u7A31
+error.validator.info.requires.transitive=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires transitive"
+error.validator.info.requires.added=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684 "requires"
+error.validator.info.requires.dropped=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u907A\u6F0F\u7684 "requires"
+error.validator.info.exports.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "exports"
+error.validator.info.opens.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "opens"
+error.validator.info.provides.notequal=\u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "provides"
+error.validator.info.version.notequal={0}: \u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "version"
+error.validator.info.manclass.notequal={0}: \u5DF2\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u76EE\u9304\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 "main-class"
 warn.validator.identical.entry=\u8B66\u544A: \u9805\u76EE {0} \u7684\u67D0\u500B\u985E\u5225\n\u8207 jar \u4E2D\u7684\u73FE\u6709\u9805\u76EE\u76F8\u540C
 warn.validator.resources.with.same.name=\u8B66\u544A: \u9805\u76EE {0} \u4E2D\u7684\u591A\u500B\u8CC7\u6E90\u540D\u7A31\u76F8\u540C
 warn.validator.concealed.public.class=\u8B66\u544A: \u9805\u76EE {0} \u662F\u96B1\u85CF\u5957\u88DD\u7A0B\u5F0F\u4E2D\u7684\n\u516C\u7528\u985E\u5225\uFF0C\u82E5\u5C07\u6B64 jar \u653E\u5728\u985E\u5225\u8DEF\u5F91\u4E0A\n\u6703\u9020\u6210\u516C\u7528\u4ECB\u9762\u4E0D\u76F8\u5BB9
+warn.release.unexpected.versioned.entry=\u672A\u9810\u671F\u7684\u555F\u52D5\u591A\u7248\u672C\u529F\u80FD\u9805\u76EE {0}
 out.added.manifest=\u5DF2\u65B0\u589E\u8CC7\u8A0A\u6E05\u55AE
 out.added.module-info=\u5DF2\u65B0\u589E module-info: {0}
+out.automodule=\u627E\u4E0D\u5230\u6A21\u7D44\u63CF\u8FF0\u5340\u3002\u5DF2\u81EA\u52D5\u884D\u751F\u6A21\u7D44\u3002
 out.update.manifest=\u5DF2\u66F4\u65B0\u8CC7\u8A0A\u6E05\u55AE
 out.update.module-info=\u5DF2\u66F4\u65B0 module-info: {0}
 out.ignore.entry=\u5FFD\u7565\u9805\u76EE {0}
@@ -88,17 +94,19 @@
 main.usage.summary=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...
 main.usage.summary.try=\u8ACB\u4F7F\u7528 'jar --help' \u4EE5\u53D6\u5F97\u66F4\u591A\u7684\u8CC7\u8A0A\u3002
 
-main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u6703\u5EFA\u7ACB\u985E\u5225\u548C\u8CC7\u6E90\u7684\u5B58\u6A94\uFF0C\u800C\u4E14\u53EF\u64CD\u63A7\u6216\n\u5F9E\u5B58\u6A94\u56DE\u5FA9\u500B\u5225\u985E\u5225\u6216\u8CC7\u6E90\u3002\n\n \u7BC4\u4F8B:\n # \u5EFA\u7ACB\u4E00\u500B\u540D\u70BA classes.jar \u4E14\u542B\u6709\u5169\u500B\u985E\u5225\u6A94\u6848\u7684\u5B58\u6A94:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73FE\u6709\u7684\u8CC7\u8A0A\u6E05\u55AE\u548C foo/ \u4E2D\u7684\u6240\u6709\u6A94\u6848\u5EFA\u7ACB\u4E00\u500B\u5B58\u6A94:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u5EFA\u7ACB\u4E00\u500B\u6A21\u7D44\u5316 jar \u5B58\u6A94\uFF0C\u5176\u4E2D\u7684\u6A21\u7D44\u63CF\u8FF0\u5340\u4F4D\u65BC\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \u5C07\u73FE\u6709\u7684\u975E\u6A21\u7D44\u5316 jar \u66F4\u65B0\u70BA\u6A21\u7D44\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \u5EFA\u7ACB\u591A\u91CD\u7248\u672C\u7684 jar\uFF0C\u5C07\u90E8\u5206\u6A94\u6848\u653E\u7F6E\u5728 META-INF/versions/9 \u76EE\u9304\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes
+main.help.preopt=\u7528\u6CD5: jar [OPTION...] [ [--release VERSION] [-C dir] files] ...\njar \u6703\u5EFA\u7ACB\u4E00\u500B\u985E\u5225\u548C\u8CC7\u6E90\u7684\u5B58\u6A94\uFF0C\u800C\u4E14\u53EF\u64CD\u63A7\u6216\n\u5F9E\u5B58\u6A94\u56DE\u5FA9\u500B\u5225\u985E\u5225\u6216\u8CC7\u6E90\u3002\n\n \u7BC4\u4F8B:\n # \u5EFA\u7ACB\u4E00\u500B\u540D\u70BA classes.jar \u7684\u5B58\u6A94\uFF0C\u5176\u4E2D\u542B\u6709\u5169\u500B\u985E\u5225\u6A94\u6848:\n jar --create --file classes.jar Foo.class Bar.class\n # \u4F7F\u7528\u73FE\u6709\u7684\u8CC7\u8A0A\u6E05\u55AE\u52A0\u4E0A foo/ \u4E2D\u7684\u6240\u6709\u6A94\u6848\u5EFA\u7ACB\u4E00\u500B\u5B58\u6A94:\n jar --create --file classes.jar --manifest mymanifest -C foo/ .\n # \u5EFA\u7ACB\u4E00\u500B\u6A21\u7D44\u5316 jar \u5B58\u6A94\uFF0C\u5176\u4E2D\u7684\u6A21\u7D44\u63CF\u8FF0\u5340\u4F4D\u65BC\n # classes/module-info.class:\n jar --create --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ classes resources\n # \u5C07\u73FE\u6709\u7684\u975E\u6A21\u7D44\u5316 jar \u66F4\u65B0\u6210\u6A21\u7D44\u5316 jar:\n jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n     -C foo/ module-info.class\n # \u5EFA\u7ACB\u591A\u91CD\u7248\u672C\u7684 jar\uFF0C\u5C07\u90E8\u5206\u6A94\u6848\u653E\u7F6E\u5728 META-INF/versions/9 \u76EE\u9304\u4E2D:\n jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\n\u82E5\u8981\u7E2E\u77ED\u6216\u7C21\u5316 jar \u547D\u4EE4\uFF0C\u53EF\u4EE5\u5728\u500B\u5225\u6587\u5B57\u6A94\u4E2D\u6307\u5B9A\u5F15\u6578\uFF0C\n\u7136\u5F8C\u4F7F\u7528 at \u7B26\u865F (@) \u4F5C\u70BA\u524D\u7F6E\u78BC\uFF0C\u5C07\u5176\u50B3\u9001\u81F3 jar \u547D\u4EE4\u3002\n\n \u7BC4\u4F8B:\n # \u5F9E classes.list \u6A94\u6848\u8B80\u53D6\u984D\u5916\u7684\u9078\u9805\u548C\u985E\u5225\u6A94\u6848\u6E05\u55AE\n jar --create --file my.jar @classes.list\n
 main.help.opt.main=\ \u4E3B\u8981\u4F5C\u696D\u6A21\u5F0F:\n
 main.help.opt.main.create=\  -c, --create               \u5EFA\u7ACB\u5B58\u6A94
 main.help.opt.main.generate-index=\  -i, --generate-index=FILE  \u70BA\u6307\u5B9A\u7684 jar \u5B58\u6A94\u7522\u751F\u7D22\u5F15\n                             \u8CC7\u8A0A
 main.help.opt.main.list=\  -t, --list                 \u5217\u51FA\u5B58\u6A94\u7684\u76EE\u9304
 main.help.opt.main.update=\  -u, --update               \u66F4\u65B0\u73FE\u6709\u7684 jar \u5B58\u6A94
 main.help.opt.main.extract=\  -x, --extract              \u5F9E\u5B58\u6A94\u4E2D\u64F7\u53D6\u6307\u5B9A (\u6216\u6240\u6709) \u6A94\u6848
-main.help.opt.main.print-module-descriptor=\  -d, --print-module-descriptor  \u5217\u5370\u6A21\u7D44\u63CF\u8FF0\u5340
+main.help.opt.main.describe-module=\  -d, --describe-module      \u5217\u5370\u6A21\u7D44\u63CF\u8FF0\u5340\u6216\u81EA\u52D5\u7522\u751F\u7684\u6A21\u7D44\u540D\u7A31
 main.help.opt.any=\ \u53EF\u5728\u4EFB\u4F55\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n\n  -C DIR                     \u8B8A\u66F4\u70BA\u6307\u5B9A\u76EE\u9304\u4E26\u5305\u542B\n                             \u4E0B\u5217\u6A94\u6848
-main.help.opt.any.file=\  -f, --file=FILE            \u5B58\u6A94\u6A94\u6848\u540D\u7A31\n      --release VERSION      \u5C07\u6240\u6709\u4E0B\u5217\u6A94\u6848\u653E\u7F6E\u5728 jar \u7684\u5DF2\u555F\u52D5\u591A\u7248\u672C\n                             \u529F\u80FD\u76EE\u9304\u4E2D (\u4F8B\u5982 META-INF/versions/VERSION/)
+main.help.opt.any.file=\  -f, --file=FILE            \u5B58\u6A94\u6A94\u6848\u540D\u7A31\u3002\u5982\u679C\u7701\u7565\uFF0C\u6703\u6839\u64DA\u4F5C\u696D\u4F7F\u7528\n                             stdin \u6216 stdout\n      --release VERSION      \u5C07\u6240\u6709\u4E0B\u5217\u6A94\u6848\u653E\u7F6E\u5728 jar \u7684\u555F\u52D5\u591A\u7248\u672C\n                             \u529F\u80FD\u76EE\u9304\u4E2D (\u4F8B\u5982 META-INF/versions/VERSION/)
 main.help.opt.any.verbose=\  -v, --verbose              \u5728\u6A19\u6E96\u8F38\u51FA\u4E2D\u7522\u751F\u8A73\u7D30\u8F38\u51FA
+main.help.opt.create=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u5F0F\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
+main.help.opt.create.normalize=\  -n, --normalize            \u5EFA\u7ACB\u65B0\u7684 jar \u5B58\u6A94\u4E4B\u5F8C\uFF0C\u5C07\u5176\u4E2D\u7684\u8CC7\u8A0A\n                             \u6A19\u6E96\u5316
 main.help.opt.create.update=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u548C\u66F4\u65B0\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
 main.help.opt.create.update.main-class=\  -e, --main-class=CLASSNAME \u96A8\u9644\u65BC\u6A21\u7D44\u5316\u6216\u53EF\u57F7\u884C\n                             jar \u5B58\u6A94\u4E2D\u7368\u7ACB\u61C9\u7528\u7A0B\u5F0F\u7684\n                             \u61C9\u7528\u7A0B\u5F0F\u9032\u5165\u9EDE
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        \u5305\u542B\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u6A94\u6848\u4E2D\u7684\u8CC7\u8A0A\u6E05\u55AE\n                             \u8CC7\u8A0A
@@ -111,7 +119,7 @@
 main.help.opt.create.update.index=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u3001\u66F4\u65B0\u53CA\u7522\u751F\u7D22\u5F15\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
 main.help.opt.create.update.index.no-compress=\  -0, --no-compress          \u50C5\u5132\u5B58; \u4E0D\u4F7F\u7528 ZIP \u58D3\u7E2E\u65B9\u5F0F
 main.help.opt.other=\ \u5176\u4ED6\u9078\u9805:\n
-main.help.opt.other.help=\  -?, --help[:compat]        \u63D0\u4F9B\u6B64\u8AAA\u660E\u6216\u9078\u64C7\u6027\u986F\u793A\u76F8\u5BB9\u6027\u8AAA\u660E
+main.help.opt.other.help=\  -h, --help[:compat]        \u63D0\u4F9B\u6B64\u8AAA\u660E\u6216\u9078\u64C7\u6027\u986F\u793A\u76F8\u5BB9\u6027\u8AAA\u660E
 main.help.opt.other.help-extra=\      --help-extra           \u63D0\u4F9B\u984D\u5916\u9078\u9805\u7684\u8AAA\u660E
 main.help.opt.other.version=\      --version              \u5217\u5370\u7A0B\u5F0F\u7248\u672C
 main.help.postopt=\ \u5982\u679C\u6A21\u7D44\u63CF\u8FF0\u5340 ('module-info.class') \u4F4D\u65BC\u6307\u5B9A\u76EE\u9304\u7684\u6839\n \u6216 jar \u5B58\u6A94\u672C\u8EAB\u7684\u6839\uFF0C\u5247\u5B58\u6A94\u6703\u662F\n \u6A21\u7D44\u5316\u7684 jar\u3002\u4E0B\u5217\u4F5C\u696D\u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\n \u73FE\u6709\u975E\u6A21\u7D44\u5316 jar \u6642\u9032\u884C: '--module-version'\u3001\n '--hash-modules' \u548C '--module-path'\u3002\n\n \u9577\u9078\u9805\u7684\u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u4E5F\u6703\u662F\u4EFB\u4F55\u5C0D\u61C9\u77ED\u9078\u9805\u7684\n \u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u3002
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/util.c	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/util.c	Wed Jul 05 23:36:51 2017 +0200
@@ -2421,7 +2421,6 @@
     /* Check data structure */
     data = (ClassInstancesData*)user_data;
     if (data == NULL) {
-        data->error = AGENT_ERROR_ILLEGAL_ARGUMENT;
         return JVMTI_VISIT_ABORT;
     }
 
@@ -2540,7 +2539,6 @@
     /* Check data structure */
     data = (ClassCountData*)user_data;
     if (data == NULL) {
-        data->error = AGENT_ERROR_ILLEGAL_ARGUMENT;
         return JVMTI_VISIT_ABORT;
     }
 
@@ -2598,7 +2596,6 @@
     /* Check data structure */
     data = (ClassCountData*)user_data;
     if (data == NULL) {
-        data->error = AGENT_ERROR_ILLEGAL_ARGUMENT;
         return JVMTI_VISIT_ABORT;
     }
 
@@ -2757,7 +2754,6 @@
     /* Check data structure */
     data = (ReferrerData*)user_data;
     if (data == NULL) {
-        data->error = AGENT_ERROR_ILLEGAL_ARGUMENT;
         return JVMTI_VISIT_ABORT;
     }
 
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -23,13 +23,9 @@
 # questions.
 #
 
-main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <mods> --output\n<path> \u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
+main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <module>[,<module>...]\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
 
-main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <mods> --output
-\<path> \u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:
-
-error.prefix=\u30A8\u30E9\u30FC:
-warn.prefix=\u8B66\u544A:
+main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --module-path <modulepath> --add-modules <module>[,<module>...]\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:
 
 main.opt.help=\  -h\u3001--help                            \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059
 
@@ -43,7 +39,11 @@
 
 main.opt.output=\      --output <path>                   \u51FA\u529B\u30D1\u30B9\u306E\u5834\u6240
 
-main.opt.launcher=\      --launcher <command>=<module>     \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u540D\n      --launcher <command>=<module>/<main>\n                                        \u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u540D
+main.opt.launcher=\      --launcher <name>=<module>[/<mainclass>]\n                                        \u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9(\u6307\u5B9A\u3057\u305F\u5834\u5408)\u306B\n                                        \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306E\u8D77\u52D5\u30C4\u30FC\u30EB\u30FB\u30B3\u30DE\u30F3\u30C9\u3092\n                                        \u8FFD\u52A0\u3057\u307E\u3059  
+
+main.opt.bind-services=\      --bind-services                   \u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3068\u305D\u306E\u4F9D\u5B58\u6027\n                                        \u5185\u3067\u30EA\u30F3\u30AF\u3057\u307E\u3059
+
+main.opt.suggest-providers=\      --suggest-providers [<name>,...]  \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u304B\u3089\u6307\u5B9A\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30BF\u30A4\u30D7\u3092\n                                        \u5B9F\u88C5\u3059\u308B\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u63A8\u5968\u3057\u307E\u3059
 
 main.command.files=\      @<filename>                       \u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059
 
@@ -53,12 +53,17 @@
 
 main.opt.ignore-signing-information=\      --ignore-signing-information      \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR\u304C\u30A4\u30E1\u30FC\u30B8\u306B\u30EA\u30F3\u30AF\n                                        \u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u81F4\u547D\u7684\u30A8\u30E9\u30FC\u3092\u6291\u6B62\n                                        \u3057\u307E\u3059\u3002\u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR\u306E\u7F72\u540D\u95A2\u9023\n                                        \u30D5\u30A1\u30A4\u30EB\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u306B\u30B3\u30D4\u30FC\n                                        \u3055\u308C\u307E\u305B\u3093\u3002
 
+main.opt.verbose=\  -v\u3001--verbose                         \u8A73\u7D30\u306A\u30C8\u30EC\u30FC\u30B9\u3092\u6709\u52B9\u306B\u3057\u307E\u3059
+
 main.msg.bug=jlink\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3067\u91CD\u8907\u304C\u306A\u3044\u304B\u3092\u3054\u78BA\u8A8D\u306E\u3046\u3048\u3001Java Bug Database (http://bugreport.java.com/bugreport/)\u3067bug\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u6B21\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002
 
 main.extended.help=\u4F7F\u7528\u53EF\u80FD\u306A\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u30EA\u30B9\u30C8:
 
 main.extended.help.footer=<pattern-list>\u3092\u5FC5\u8981\u3068\u3059\u308B\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5834\u5408\u3001\u5024\u306F\u3001\u6B21\u306E\u5F62\u5F0F\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3059\u308B\u3001\u8981\u7D20\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u306B\u306A\u308A\u307E\u3059:\n  <glob-pattern>\n  glob:<glob-pattern>\n  regex:<regex-pattern>\n  @<filename> filename\u306F\u3001\u4F7F\u7528\u3059\u308B\u30D1\u30BF\u30FC\u30F3\u3092\u542B\u3080\u30D5\u30A1\u30A4\u30EB(1\u884C\u3054\u3068\u306B1\u30D1\u30BF\u30FC\u30F3)\u306E\u540D\u524D\u3067\u3059\n\n
 
+error.prefix=\u30A8\u30E9\u30FC:
+warn.prefix=\u8B66\u544A:
+
 err.unknown.byte.order:\u4E0D\u660E\u306A\u30D0\u30A4\u30C8\u9806{0}
 err.launcher.main.class.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0}
 err.launcher.module.name.empty:\u8D77\u52D5\u30C4\u30FC\u30EB\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u540D\u306F\u7A7A\u306B\u3067\u304D\u307E\u305B\u3093: {0}
@@ -75,12 +80,12 @@
 err.dir.exists={0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
 err.badpattern=\u4E0D\u6B63\u30D1\u30BF\u30FC\u30F3{0}
 err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
-err.orphan.argument=\u5B64\u7ACB\u3057\u305F\u5F15\u6570: {0}
 err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0} {1} {2}
 err.invalid.arg.for.option=\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059: {0}
 err.option.after.class=\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u30AF\u30E9\u30B9\u306E\u524D\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0}
 err.option.unsupported={0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {1}
+err.orphan.arguments={0}\u306F\u7121\u52B9\u306A\u5F15\u6570\u3067\u3059
 err.config.defaults=\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u304C\u69CB\u6210\u306B\u3042\u308A\u307E\u305B\u3093
 err.config.defaults.value=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u304C\u9593\u9055\u3063\u3066\u3044\u307E\u3059: {0}
 err.bom.generation=bom\u30D5\u30A1\u30A4\u30EB\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
@@ -89,3 +94,7 @@
 warn.signing=\u8B66\u544A: \u7F72\u540D\u6E08\u30E2\u30B8\u30E5\u30E9JAR {0}\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
 warn.split.package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306F{1} {2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059
+warn.provider.notfound=--suggest-providers\u306B\u6307\u5B9A\u3055\u308C\u305F\u30B5\u30FC\u30D3\u30B9\u306B\u30D7\u30ED\u30D0\u30A4\u30C0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
+no.suggested.providers=--bind-services\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u8FFD\u52A0\u306E\u30D7\u30ED\u30D0\u30A4\u30C0\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093\u3002
+suggested.providers.header=\u63A8\u5968\u30D7\u30ED\u30D0\u30A4\u30C0
+providers.header=\u30D7\u30ED\u30D0\u30A4\u30C0
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -23,13 +23,9 @@
 # questions.
 #
 
-main.usage.summary=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output\n<\u8DEF\u5F84> \u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
+main.usage.summary=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757>[,<\u6A21\u5757>...]\n\u4F7F\u7528 --help \u53EF\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
 
-main.usage=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757> --output
-\<path> \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:
-
-error.prefix=\u9519\u8BEF:
-warn.prefix=\u8B66\u544A:
+main.usage=\u7528\u6CD5: {0} <\u9009\u9879> --module-path <\u6A21\u5757\u8DEF\u5F84> --add-modules <\u6A21\u5757>[,<\u6A21\u5757>...]\n\u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:
 
 main.opt.help=\  -h, --help                              \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F
 
@@ -43,7 +39,11 @@
 
 main.opt.output=\      --output <\u8DEF\u5F84>                     \u8F93\u51FA\u8DEF\u5F84\u7684\u4F4D\u7F6E
 
-main.opt.launcher=\      --launcher <\u547D\u4EE4>=<\u6A21\u5757>            \u6A21\u5757\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\u540D\u79F0\n      --launcher <\u547D\u4EE4>=<\u6A21\u5757>/<\u4E3B\u7C7B>\n                                          \u6A21\u5757\u548C\u4E3B\u7C7B\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\u540D\u79F0
+main.opt.launcher=\      --launcher <\u540D\u79F0>=<\u6A21\u5757>[/<\u4E3B\u7C7B>]\n                                        \u4E3A\u6A21\u5757\u548C\u4E3B\u7C7B\u6DFB\u52A0\u7ED9\u5B9A\n                                        \u540D\u79F0\u7684\u542F\u52A8\u7A0B\u5E8F\u547D\u4EE4\n                                        (\u5982\u679C\u6307\u5B9A)  
+
+main.opt.bind-services=\      --bind-services                   \u94FE\u63A5\u670D\u52A1\u63D0\u4F9B\u65B9\u6A21\u5757\u53CA\u5176\n                                        \u88AB\u4F9D\u8D56\u5BF9\u8C61
+
+main.opt.suggest-providers=\      --suggest-providers [<\u540D\u79F0>,...]  \u5EFA\u8BAE\u53EF\u4ECE\u6A21\u5757\u8DEF\u5F84\u4E2D\u5B9E\u73B0\n                                        \u7ED9\u5B9A\u670D\u52A1\u7C7B\u578B\u7684\u63D0\u4F9B\u65B9
 
 main.command.files=\      @<\u6587\u4EF6\u540D>                           \u4ECE\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879
 
@@ -53,12 +53,17 @@
 
 main.opt.ignore-signing-information=\      --ignore-signing-information        \u5728\u6620\u50CF\u4E2D\u94FE\u63A5\u5DF2\u7B7E\u540D\u6A21\u5757\u5316\n                                          JAR \u7684\u60C5\u51B5\u4E0B\u9690\u85CF\u81F4\u547D\u9519\u8BEF\u3002\n                                          \u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR \u7684\u7B7E\u540D\n                                          \u76F8\u5173\u6587\u4EF6\u5C06\u4E0D\u4F1A\u590D\u5236\u5230\n                                          \u8FD0\u884C\u65F6\u6620\u50CF\u3002
 
+main.opt.verbose=\  -v, --verbose                         \u542F\u7528\u8BE6\u7EC6\u8DDF\u8E2A
+
 main.msg.bug=jlink \u4E2D\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u5982\u679C\u5728 Java Bug Database (http://bugreport.java.com/bugreport/) \u4E2D\u6CA1\u6709\u627E\u5230\u8BE5\u9519\u8BEF, \u8BF7\u5728\u8BE5\u6570\u636E\u5E93\u4E2D\u5EFA\u7ACB Bug\u3002\u8BF7\u5728\u62A5\u544A\u4E2D\u9644\u4E0A\u60A8\u7684\u7A0B\u5E8F\u548C\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002\u8C22\u8C22\u3002
 
 main.extended.help=\u53EF\u7528\u63D2\u4EF6\u5217\u8868:
 
 main.extended.help.footer=\u5BF9\u4E8E\u9700\u8981 <\u6A21\u5F0F\u5217\u8868> \u7684\u9009\u9879, \u503C\u5C06\u4E3A\u9017\u53F7\u5206\u9694\u7684\u5143\u7D20\u5217\u8868, \u6BCF\u4E2A\u5143\u7D20\u4F7F\u7528\u4EE5\u4E0B\u683C\u5F0F\u4E4B\u4E00:\n  <glob \u6A21\u5F0F>\n  glob:<glob \u6A21\u5F0F>\n  regex:<\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F>\n  @<\u6587\u4EF6\u540D>, \u5176\u4E2D\u201C\u6587\u4EF6\u540D\u201D\u662F\u5305\u542B\u8981\u4F7F\u7528\u7684\u6A21\u5F0F\u7684\u6587\u4EF6\u540D, \u6BCF\u884C\u4E00\u4E2A\u6A21\u5F0F\n\n
 
+error.prefix=\u9519\u8BEF:
+warn.prefix=\u8B66\u544A:
+
 err.unknown.byte.order:\u672A\u77E5\u7684\u5B57\u8282\u987A\u5E8F {0}
 err.launcher.main.class.empty:\u542F\u52A8\u7A0B\u5E8F\u4E3B\u7C7B\u540D\u4E0D\u80FD\u4E3A\u7A7A: {0}
 err.launcher.module.name.empty:\u542F\u52A8\u7A0B\u5E8F\u6A21\u5757\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A: {0}
@@ -75,12 +80,12 @@
 err.dir.exists={0} \u5DF2\u5B58\u5728
 err.badpattern=\u9519\u8BEF\u7684\u6A21\u5F0F {0}
 err.unknown.option=\u672A\u77E5\u9009\u9879: {0}
-err.orphan.argument=\u5B64\u7ACB\u7684\u53C2\u6570: {0}
 err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C
 err.internal.error=\u5185\u90E8\u9519\u8BEF: {0} {1} {2}
 err.invalid.arg.for.option=\u9009\u9879\u7684\u53C2\u6570\u65E0\u6548: {0}
 err.option.after.class=\u5FC5\u987B\u5728\u7C7B\u4E4B\u524D\u6307\u5B9A\u9009\u9879: {0}
 err.option.unsupported=\u4E0D\u652F\u6301{0}: {1}
+err.orphan.arguments=\u65E0\u6548\u7684\u53C2\u6570: {0}
 err.config.defaults=\u914D\u7F6E\u4E2D\u7F3A\u5C11\u5C5E\u6027 {0}
 err.config.defaults.value=\u9ED8\u8BA4\u5C5E\u6027\u4E2D\u7684\u503C\u9519\u8BEF: {0}
 err.bom.generation=\u672A\u80FD\u751F\u6210 bom \u6587\u4EF6: {0}
@@ -89,3 +94,7 @@
 warn.signing=\u8B66\u544A: \u5F53\u524D\u4E0D\u652F\u6301\u5DF2\u7B7E\u540D\u6A21\u5757\u5316 JAR {0}
 warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0}
 warn.split.package=\u5DF2\u5728{1} {2}\u4E2D\u5B9A\u4E49\u7A0B\u5E8F\u5305{0}
+warn.provider.notfound=\u627E\u4E0D\u5230\u4E3A --suggest-providers \u6307\u5B9A\u7684\u670D\u52A1\u63D0\u4F9B\u65B9: {0}
+no.suggested.providers=\u6307\u5B9A\u4E86 --bind-services \u9009\u9879\u3002\u672A\u5EFA\u8BAE\u5176\u4ED6\u63D0\u4F9B\u65B9\u3002
+suggested.providers.header=\u5EFA\u8BAE\u7684\u63D0\u4F9B\u65B9
+providers.header=\u63D0\u4F9B\u65B9
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -52,12 +52,8 @@
 main.opt.main-class=\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9
 main.opt.main-class.arg=class-name
 main.opt.man-pages=man\u30DA\u30FC\u30B8\u306E\u5834\u6240
-main.opt.os-name=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u540D
-main.opt.os-name.arg=os-name
-main.opt.os-arch=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3
-main.opt.os-arch.arg=os-arch
-main.opt.os-version=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3
-main.opt.os-version.arg=os-version
+main.opt.target-platform=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0
+main.opt.target-platform.arg=target-platform
 main.opt.module-path=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9
 main.opt.hash-modules=\u6307\u5B9A\u306E<regex-pattern>\u306B\u4E00\u81F4\u3057\u3001\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\u4F9D\u5B58\u3057\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7D50\u5408\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u3092\u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059\u3002\u30CF\u30C3\u30B7\u30E5\u306F\u3001\u4F5C\u6210\u3055\u308C\u3066\u3044\u308BJMOD\u30D5\u30A1\u30A4\u30EB\u3001jmod hash\u30B3\u30DE\u30F3\u30C9\u3067\u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306EJMOD\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30E9JAR\u306B\u8A18\u9332\u3055\u308C\u307E\u3059\u3002
 main.opt.do-not-resolve-by-default=\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30EB\u30FC\u30C8\u8A2D\u5B9A\u304B\u3089\u9664\u5916\u3057\u307E\u3059
@@ -91,9 +87,9 @@
 err.invalid.dryrun.option=--dry-run\u306F\u30CF\u30C3\u30B7\u30E5\u30FB\u30E2\u30FC\u30C9\u3068\u4E00\u7DD2\u306B\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
 err.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 err.missing.export.or.open.packages={0}\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3055\u308C\u305F\u304B\u305D\u3053\u3067\u30AA\u30FC\u30D7\u30F3\u3055\u308C\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {1}
+err.module.resolution.fail=\u89E3\u6C7A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}
 warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
 warn.no.module.hashes=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}\u306B\u4F9D\u5B58\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u306B\u5BFE\u3057\u3066\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-warn.module.resolution.fail=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}
 warn.ignore.entry=\u30BB\u30AF\u30B7\u30E7\u30F3{1}\u306E\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
 warn.ignore.duplicate.entry=\u30BB\u30AF\u30B7\u30E7\u30F3{1}\u306E\u91CD\u8907\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
 
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties	Wed Jul 05 23:36:51 2017 +0200
@@ -52,12 +52,8 @@
 main.opt.main-class=\u4E3B\u7C7B
 main.opt.main-class.arg=class-name
 main.opt.man-pages=\u5E2E\u52A9\u9875\u7684\u4F4D\u7F6E
-main.opt.os-name=\u64CD\u4F5C\u7CFB\u7EDF\u540D\u79F0
-main.opt.os-name.arg=os-name
-main.opt.os-arch=\u64CD\u4F5C\u7CFB\u7EDF\u4F53\u7CFB\u7ED3\u6784
-main.opt.os-arch.arg=os-arch
-main.opt.os-version=\u64CD\u4F5C\u7CFB\u7EDF\u7248\u672C
-main.opt.os-version.arg=os-version
+main.opt.target-platform=\u76EE\u6807\u5E73\u53F0
+main.opt.target-platform.arg=target-platform
 main.opt.module-path=\u6A21\u5757\u8DEF\u5F84
 main.opt.hash-modules=\u8BA1\u7B97\u548C\u8BB0\u5F55\u6563\u5217, \u4EE5\u5C06\u6253\u5305\u6A21\u5757\u7ED1\u5B9A\u5230\u4E0E\u6307\u5B9A <\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F> \u5339\u914D\u5E76\u76F4\u63A5\u6216\u95F4\u63A5\u4F9D\u8D56\u4E8E\u7684\u6A21\u5757\u3002\u6563\u5217\u8BB0\u5F55\u5728\u6240\u521B\u5EFA\u7684 JMOD \u6587\u4EF6\u4E2D, \u6216\u8005\u8BB0\u5F55\u5728 jmod hash \u547D\u4EE4\u6307\u5B9A\u7684\u6A21\u5757\u8DEF\u5F84\u7684 JMOD \u6587\u4EF6\u6216\u6A21\u5757\u5316 JAR \u4E2D\u3002
 main.opt.do-not-resolve-by-default=\u4ECE\u9ED8\u8BA4\u6839\u6A21\u5757\u96C6\u4E2D\u6392\u9664
@@ -91,9 +87,9 @@
 err.invalid.dryrun.option=--dry-run \u53EA\u80FD\u7528\u4E8E\u6563\u5217\u6A21\u5F0F
 err.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26
 err.missing.export.or.open.packages=\u5728 {0} \u4E2D\u5BFC\u51FA\u6216\u6253\u5F00\u7684\u7A0B\u5E8F\u5305\u4E0D\u5B58\u5728: {1}
+err.module.resolution.fail=\u89E3\u6790\u5931\u8D25: {0}
 warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0}
 warn.no.module.hashes=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: \u6CA1\u6709\u4E3A\u4F9D\u8D56\u4E8E {0} \u7684\u6563\u5217\u5904\u7406\u6307\u5B9A\u6A21\u5757
-warn.module.resolution.fail=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: {0}
 warn.ignore.entry=\u6B63\u5728\u5FFD\u7565\u8282 {1} \u4E2D\u7684\u6761\u76EE {0}
 warn.ignore.duplicate.entry=\u6B63\u5728\u5FFD\u7565\u8282 {1} \u4E2D\u7684\u91CD\u590D\u6761\u76EE {0}
 
--- a/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_sv.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/Resources_sv.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
     private static final Object[][] contents = {
         {"NEWLINE", "\n"},
         {"Warning.A.public.key.for.alias.signers.i.does.not.exist.Make.sure.a.KeyStore.is.properly.configured.",
-                "Varning! Det finns ingen offentlig nyckel f\u00F6r aliaset {0}. Kontrollera att det aktuella nyckellagret \u00E4r korrekt konfigurerat."},
+                "Varning! Det finns ingen \u00F6ppen nyckel f\u00F6r aliaset {0}. Kontrollera att det aktuella nyckellagret \u00E4r korrekt konfigurerat."},
         {"Warning.Class.not.found.class", "Varning! Klassen hittades inte: {0}"},
         {"Warning.Invalid.argument.s.for.constructor.arg",
                 "Varning! Ogiltiga argument f\u00F6r konstruktor: {0}"},
@@ -59,8 +59,8 @@
         {"Warning.File.name.may.include.escaped.backslash.characters.It.is.not.necessary.to.escape.backslash.characters.the.tool.escapes",
             "Varning! Filnamnet kan inneh\u00E5lla omv\u00E4nda snedstreck inom citattecken. Citattecken kr\u00E4vs inte f\u00F6r omv\u00E4nda snedstreck (verktyget hanterar detta n\u00E4r policyinneh\u00E5llet skrivs till det best\u00E4ndiga lagret).\n\nKlicka p\u00E5 Beh\u00E5ll f\u00F6r att beh\u00E5lla det angivna namnet, eller klicka p\u00E5 Redigera f\u00F6r att \u00E4ndra det."},
 
-        {"Add.Public.Key.Alias", "L\u00E4gg till offentligt nyckelalias"},
-        {"Remove.Public.Key.Alias", "Ta bort offentligt nyckelalias"},
+        {"Add.Public.Key.Alias", "L\u00E4gg till alias till \u00F6ppen nyckel"},
+        {"Remove.Public.Key.Alias", "Ta bort alias f\u00F6r \u00F6ppen nyckel"},
         {"File", "&Arkiv"},
         {"KeyStore", "&KeyStore"},
         {"Policy.File.", "Policyfil:"},
@@ -68,7 +68,7 @@
                 "Kan inte \u00F6ppna policyfilen: {0}: {1}"},
         {"Policy.Tool", "Policyverktyg"},
         {"Errors.have.occurred.while.opening.the.policy.configuration.View.the.Warning.Log.for.more.information.",
-                "Det uppstod ett fel n\u00E4r policykonfigurationen skulle \u00F6ppnas. Se varningsloggen f\u00F6r mer information."},
+                "Ett fel intr\u00E4ffade n\u00E4r policykonfigurationen skulle \u00F6ppnas. Se varningsloggen f\u00F6r mer information."},
         {"Error", "Fel"},
         {"OK", "OK"},
         {"Status", "Status"},
@@ -80,7 +80,7 @@
         {"Target.Name.",
                 "M\u00E5l:                                                    "},
         {"Actions.",
-                "Funktioner:                                                             "},
+                "\u00C5tg\u00E4rder:                                                             "},
         {"OK.to.overwrite.existing.file.filename.",
                 "Ska den befintliga filen {0} skrivas \u00F6ver?"},
         {"Cancel", "Avbryt"},
@@ -94,10 +94,10 @@
         {".Edit.Permission", "  Re&digera beh\u00F6righet"},
         {"Remove.Permission", "Ta &bort beh\u00F6righet"},
         {"Done", "Utf\u00F6rd"},
-        {"KeyStore.URL.", "KeyStore-&URL:"},
-        {"KeyStore.Type.", "KeyStore-&typ:"},
-        {"KeyStore.Provider.", "KeyStore-&leverant\u00F6r:"},
-        {"KeyStore.Password.URL.", "KeyStore-l\u00F6sen&ords-URL:"},
+        {"KeyStore.URL.", "Nyckellager-&URL:"},
+        {"KeyStore.Type.", "Nyckellager&typ:"},
+        {"KeyStore.Provider.", "Nyckellager&leverant\u00F6r:"},
+        {"KeyStore.Password.URL.", "L\u00F6sen&ords-URL till nyckellager:"},
         {"Principals", "Identitetshavare"},
         {".Edit.Principal.", "  Redigera identitetshavare:"},
         {".Add.New.Principal.", "  L\u00E4gg till ny identitetshavare:"},
@@ -136,7 +136,7 @@
         {"provider.name", "leverant\u00F6rsnamn"},
         {"url", "url"},
         {"method.list", "metodlista"},
-        {"request.headers.list", "beg\u00E4ranrubriklista"},
+        {"request.headers.list", "lista \u00F6ver beg\u00E4randehuvuden"},
         {"Principal.List", "Lista \u00F6ver identitetshavare"},
         {"Permission.List", "Beh\u00F6righetslista"},
         {"Code.Base", "Kodbas"},
--- a/jdk/test/ProblemList.txt	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/ProblemList.txt	Wed Jul 05 23:36:51 2017 +0200
@@ -219,9 +219,13 @@
 ############################################################################
 
 # jdk_sound
-javax/sound/sampled/DirectAudio/bug6372428.java        8055097 generic-all
-javax/sound/sampled/Clip/bug5070081.java               8055097 generic-all
-javax/sound/sampled/DataLine/LongFramePosition.java    8055097 generic-all
+javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java 8178401 windows-all
+
+javax/sound/sampled/Clip/ClipCloseLoss.java                          8178403 generic-all
+
+javax/sound/sampled/DirectAudio/bug6372428.java                      8055097 generic-all
+javax/sound/sampled/Clip/bug5070081.java                             8055097 generic-all
+javax/sound/sampled/DataLine/LongFramePosition.java                  8055097 generic-all
 
 javax/sound/sampled/Clip/Drain/ClipDrain.java          7062792 generic-all
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/image/RescaleOp/ImageRescaleOpTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8177393
+ * @summary Verify RescaleOp applied to BufferedImages.
+ * @run main ImageRescaleOpTest
+ */
+
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import static java.awt.image.BufferedImage.*;
+import java.awt.image.RescaleOp;
+import java.awt.Color;
+import java.io.File;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+public class ImageRescaleOpTest {
+
+    int w = 10, h = 10;
+    float scaleFactor = 0.5f;
+    float offset = 0.0f;
+    static boolean saveImage = false;
+
+    public static void main(String[] args) throws Exception {
+        saveImage = args.length > 0;
+        ImageRescaleOpTest test = new ImageRescaleOpTest();
+        test.startTest();
+    }
+
+    String getFileName(int s, int d) {
+        return textFor(s)+"_to_"+textFor(d)+".png";
+    }
+
+    String getMsgText(int s, int d) {
+        return textFor(s)+"->"+textFor(d)+": ";
+    }
+
+    String textFor(int t) {
+       switch (t) {
+           case TYPE_INT_ARGB        : return "ARGB";
+           case TYPE_INT_RGB         : return "RGB";
+           case TYPE_4BYTE_ABGR      : return "4BYTEABGR";
+           case TYPE_3BYTE_BGR       : return "3BYTEBGR";
+           case TYPE_USHORT_555_RGB  : return "USHORT_555_RGB";
+           case TYPE_USHORT_565_RGB  : return "USHORT_565_RGB";
+           case TYPE_USHORT_GRAY     : return "USHORT_GRAY";
+           default                   : return "OTHER";
+       }
+    }
+
+    private void startTest() throws Exception {
+
+        int expect = 0xff7f7f7f;
+        runTest(TYPE_INT_RGB, TYPE_INT_RGB, expect);
+        runTest(TYPE_INT_ARGB, TYPE_INT_ARGB, expect);
+        runTest(TYPE_INT_ARGB, TYPE_INT_RGB, expect);
+        runTest(TYPE_INT_RGB, TYPE_INT_ARGB, expect);
+
+        runTest(TYPE_3BYTE_BGR, TYPE_3BYTE_BGR, expect);
+        runTest(TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, expect);
+        runTest(TYPE_4BYTE_ABGR, TYPE_3BYTE_BGR, expect);
+        runTest(TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR, expect);
+
+        /* Slightly different values here due to limited precision */
+        runTest(TYPE_USHORT_555_RGB, TYPE_USHORT_555_RGB, 0xff7b7b7b);
+        runTest(TYPE_USHORT_565_RGB, TYPE_USHORT_565_RGB, 0xff7b7d7b);
+
+        /* 565->555 and 555->565 results are wrong as the slow code
+         * path used is not accounting for the difference in the range.
+         */
+        //runTest(TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, expect);
+        //runTest(TYPE_USHORT_565_RGB, TYPE_USHORT_555_RGB, expect);
+
+        runTest(TYPE_USHORT_GRAY, TYPE_USHORT_GRAY, 0xffbcbcbc);
+
+    }
+
+   private void check(BufferedImage bi, int expect, String msg) {
+        int argb = bi.getRGB(w-1, h-1);
+        System.out.println(msg + Integer.toHexString(argb));
+        if (argb != expect) {
+            throw new RuntimeException(msg +
+                   " expected " + Integer.toHexString(expect) +
+                   " but got " + Integer.toHexString(argb));
+        }
+    }
+
+    private void runTest(int sType, int dType, int expect) {
+
+        BufferedImage src  = new BufferedImage(w, h, sType);
+        BufferedImage dst  = new BufferedImage(w, h, dType);
+        String msg = getMsgText(sType, dType);
+
+        Graphics2D g2d = src.createGraphics();
+        g2d.setColor(Color.WHITE);
+        g2d.fillRect(0, 0, w, h);
+        RescaleOp res = new RescaleOp(scaleFactor, offset, null);
+        res.filter(src, dst);
+        if (saveImage) {
+            try {
+               String fname = getFileName(sType, dType);
+               ImageIO.write(dst, "png", new File(fname));
+            } catch (IOException e) {
+            }
+        }
+        check(dst, expect, msg);
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/File/TimeZoneLastModified.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6212869
+ * @summary Determine if lastModified() works after TimeZone.setDefault()
+ * @run main/othervm TimeZoneLastModified
+ */
+
+import java.io.File;
+import java.util.Date;
+import java.util.TimeZone;
+import java.text.SimpleDateFormat;
+
+public class TimeZoneLastModified {
+    // Tue, 04 Jun 2002 13:56:50.002 GMT
+    private static final long TIME = 1023199010002L;
+
+    public static void main(String[] args) throws Throwable {
+        int failures = test(null);
+        for (String timeZoneID : TimeZone.getAvailableIDs()) {
+            failures += test(timeZoneID);
+        }
+        if (failures != 0) {
+            throw new RuntimeException("TimeZoneLastModified failed");
+        }
+        System.out.println("TimeZoneLastModified passed");
+    }
+
+    private static int test(String timeZoneID) throws Throwable {
+        File f = new File("test-timezone.txt");
+        int failures = 0;
+        try {
+            f.createNewFile();
+
+            if (timeZoneID != null) {
+                TimeZone.setDefault(TimeZone.getTimeZone(timeZoneID));
+            }
+
+            boolean succeeded = f.setLastModified(TIME);
+            if (!succeeded) {
+                System.err.format
+                    ("Setting time to %d failed for time zone %s%n",
+                    TIME, timeZoneID);
+                failures++;
+            }
+
+            long time = f.lastModified();
+            if (Math.abs(time - TIME) > 999) { // account for second precision
+                System.err.format
+                    ("Wrong modification time (ms): expected %d, obtained %d%n",
+                    TIME, time);
+                failures++;
+            }
+        } finally {
+            f.delete();
+        }
+
+        return failures;
+    }
+}
--- a/jdk/test/java/io/FilePermission/ReadFileOnPath.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/io/FilePermission/ReadFileOnPath.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -32,6 +32,7 @@
  */
 
 import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import java.nio.file.Files;
 import java.nio.file.Path;
--- a/jdk/test/java/io/Serializable/class/NonSerialA_1.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-public class A {
-    int field1;
-};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/NonSerialA_1/A.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * 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.
+ */
+
+
+public class A {
+    int field1;
+};
--- a/jdk/test/java/io/Serializable/class/NonSerialA_2.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-public class A {
-    int field1;
-    int field2;
-};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/NonSerialA_2/A.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * 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.
+ */
+
+public class A {
+    int field1;
+    int field2;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/NonSerializableTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4075221
+ * @library /test/lib
+ * @build jdk.test.lib.compiler.*
+ * @build jdk.test.lib.process.*
+ * @run testng/timeout=300 NonSerializableTest
+ * @summary Enable serialize of nonSerializable Class descriptor.
+ */
+
+import java.nio.file.Paths;
+import java.util.Arrays;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertEquals;
+
+import jdk.test.lib.compiler.CompilerUtils;
+import jdk.test.lib.process.ProcessTools;
+
+
+public class NonSerializableTest {
+
+    @BeforeClass
+    public void setup() throws Exception {
+        boolean b = CompilerUtils.compile(
+                Paths.get(System.getProperty("test.src"), "TestEntry.java"),
+                Paths.get(System.getProperty("user.dir")));
+        assertTrue(b, "Compilation failed");
+    }
+
+    @DataProvider
+    public Object[][] provider() {
+        return new String[][][] {
+            // Write NonSerial1, Read NonSerial1
+            {{"NonSerialA_1", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"NonSerialA_1", "-cp", ".", "TestEntry", "-d"}},
+
+            // Write NonSerial1, Read NonSerial2
+            {{"NonSerialA_1", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"NonSerialA_2", "-cp", ".", "TestEntry", "-d"}},
+
+            // Write NonSerial1, Read Serial1
+            {{"NonSerialA_1", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"SerialA_1", "-cp", ".", "TestEntry", "-d"}},
+
+            // Write Serial1, Read NonSerial1
+            {{"SerialA_1", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"NonSerialA_1", "-cp", ".", "TestEntry", "-doe"}},
+
+            // Write Serial1, Read Serial2
+            {{"SerialA_1", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"SerialA_2", "-cp", ".", "TestEntry", "-d"}},
+
+            // Write Serial2, Read Serial1
+            {{"SerialA_2", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"SerialA_1", "-cp", ".", "TestEntry", "-d"}},
+
+            // Write Serial1, Read Serial3
+            {{"SerialA_1", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"SerialA_3", "-cp", ".", "TestEntry", "-de"}},
+
+            // Write Serial3, Read Serial1
+            {{"SerialA_3", "-cp", ".", "TestEntry", "-s", "A"}},
+            {{"SerialA_1", "-cp", ".", "TestEntry", "-de"}},
+        };
+    }
+
+    @Test(dataProvider="provider")
+    public void test(String[] args) throws Exception {
+        boolean b = CompilerUtils.compile(Paths.get(System.getProperty("test.src"), args[0]),
+                                          Paths.get(System.getProperty("user.dir")));
+        assertTrue(b, "Compilation failed");
+        String params[] = Arrays.copyOfRange(args, 1, args.length);
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(params);
+        Process p = ProcessTools.startProcess("Serializable Test", pb);
+        int exitValue = p.waitFor();
+        assertEquals(exitValue, 0, "Test failed");
+    }
+}
--- a/jdk/test/java/io/Serializable/class/SerialA.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.Serializable;
-
-public class A implements Serializable {
-    int field1;
-};
--- a/jdk/test/java/io/Serializable/class/SerialA_1.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.Serializable;
-
-public class A implements Serializable {
-    int field1;
-};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/SerialA_1/A.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * 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.Serializable;
+
+public class A implements Serializable {
+    int field1;
+};
--- a/jdk/test/java/io/Serializable/class/SerialA_2.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.Serializable;
-
-public class A implements Serializable {
-    static final long serialVersionUID = 746945609796141988L;
-
-    int field1;
-    int field2;
-};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/SerialA_2/A.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * 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.Serializable;
+
+public class A implements Serializable {
+    static final long serialVersionUID = 746945609796141988L;
+
+    int field1;
+    int field2;
+};
--- a/jdk/test/java/io/Serializable/class/SerialA_3.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.Serializable;
-
-/* THis class is purposely not compatible with previous versions of class.*/
-public class A implements Serializable {
-    int field1;
-    int field2;
-    int field3;
-};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/SerialA_3/A.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * 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.Serializable;
+
+/* THis class is purposely not compatible with previous versions of class.*/
+public class A implements Serializable {
+    int field1;
+    int field2;
+    int field3;
+};
--- a/jdk/test/java/io/Serializable/class/Test.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/*
- * @bug 4075221
- * @summary Enable serialize of nonSerializable Class descriptor.
- */
-
-import java.io.*;
-
-class Test {
-    public static void main(String args[]) throws Exception {
-        File f = new File("tmp.ser");
-        if (args[0].compareTo("-s") == 0) {
-            FileOutputStream of = new FileOutputStream(f);
-            ObjectOutputStream oos = new ObjectOutputStream(of);
-            Class cl = Class.forName(args[1]);
-            oos.writeObject(cl);
-            if (ObjectStreamClass.lookup(cl) != null)
-                oos.writeObject(cl.newInstance());
-            oos.close();
-            System.out.println("Serialized Class " + cl.getName());
-        } else if (args[0].compareTo("-de") == 0) {
-            FileInputStream inf = new FileInputStream(f);
-            ObjectInputStream ois = new ObjectInputStream(inf);
-            Class cl = null;
-            try {
-                cl = (Class)ois.readObject();
-                throw new Error("Expected InvalidClassException to be thrown");
-            } catch (InvalidClassException e) {
-                System.out.println("Caught expected exception DeSerializing class " + e.getMessage());
-            }
-            ois.close();
-        } else if (args[0].compareTo("-doe") == 0) {
-            FileInputStream inf = new FileInputStream(f);
-            ObjectInputStream ois = new ObjectInputStream(inf);
-            Class cl = null;
-            cl = (Class)ois.readObject();
-            try {
-                ois.readObject();
-                throw new Error("Expected InvalidClassException to be thrown");
-            } catch (InvalidClassException e) {
-                System.out.println("Caught expected exception DeSerializing class " + e.getMessage());
-            }
-            ois.close();
-        } else if (args[0].compareTo("-d") == 0) {
-            FileInputStream inf = new FileInputStream(f);
-            ObjectInputStream ois = new ObjectInputStream(inf);
-            Class cl = (Class)ois.readObject();
-            try {
-                ois.readObject();
-            } catch (EOFException e) {
-            }
-            ois.close();
-            System.out.println("DeSerialized Class " + cl.getName());
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/Serializable/class/TestEntry.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1998, 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.
+ */
+
+/*
+ * @bug 4075221
+ * @summary Enable serialize of nonSerializable Class descriptor.
+ */
+
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileInputStream;
+import java.io.InvalidClassException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
+
+class TestEntry {
+    public static void main(String args[]) throws Exception {
+        File f = new File("tmp.ser");
+        if (args[0].compareTo("-s") == 0) {
+            FileOutputStream of = new FileOutputStream(f);
+            ObjectOutputStream oos = new ObjectOutputStream(of);
+            Class cl = Class.forName(args[1]);
+            oos.writeObject(cl);
+            if (ObjectStreamClass.lookup(cl) != null)
+                oos.writeObject(cl.newInstance());
+            oos.close();
+            System.out.println("Serialized Class " + cl.getName());
+        } else if (args[0].compareTo("-de") == 0) {
+            FileInputStream inf = new FileInputStream(f);
+            ObjectInputStream ois = new ObjectInputStream(inf);
+            Class cl = null;
+            try {
+                cl = (Class)ois.readObject();
+                throw new Error("Expected InvalidClassException to be thrown");
+            } catch (InvalidClassException e) {
+                System.out.println("Caught expected exception DeSerializing class " + e.getMessage());
+            }
+            ois.close();
+        } else if (args[0].compareTo("-doe") == 0) {
+            FileInputStream inf = new FileInputStream(f);
+            ObjectInputStream ois = new ObjectInputStream(inf);
+            Class cl = null;
+            cl = (Class)ois.readObject();
+            try {
+                ois.readObject();
+                throw new Error("Expected InvalidClassException to be thrown");
+            } catch (InvalidClassException e) {
+                System.out.println("Caught expected exception DeSerializing class " + e.getMessage());
+            }
+            ois.close();
+        } else if (args[0].compareTo("-d") == 0) {
+            FileInputStream inf = new FileInputStream(f);
+            ObjectInputStream ois = new ObjectInputStream(inf);
+            Class cl = (Class)ois.readObject();
+            try {
+                ois.readObject();
+            } catch (EOFException e) {
+            }
+            ois.close();
+            System.out.println("DeSerialized Class " + cl.getName());
+        } else {
+            throw new RuntimeException("Unrecognized argument");
+        }
+    }
+}
--- a/jdk/test/java/io/Serializable/class/run.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-#
-# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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 4075221
-# @run shell/timeout=300 run.sh
-# @summary Enable serialize of nonSerializable Class descriptor.
-
-set -ex	
-
-if [ "${TESTJAVA}" = "" ]
-then
-  echo "TESTJAVA not set.  Test cannot execute.  Failed."
-  exit 1
-fi
-
-if [ "${COMPILEJAVA}" = "" ] ; then
-  COMPILEJAVA="${TESTJAVA}"
-fi
-
-if [ "${TESTSRC}" = "" ]
-then
-TESTSRC="."
-fi
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/Test.java
-
-echo Write NonSerial1, Read NonSerial1
-rm -f A.java     
-cp ${TESTSRC}/NonSerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -d
-echo
-
-echo Write NonSerial1, Read NonSerial2
-rm -f A.java     
-cp ${TESTSRC}/NonSerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/NonSerialA_2.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -d
-echo
-
-echo Write NonSerial1, Read Serial1
-rm -f A.java     
-cp ${TESTSRC}/NonSerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java 
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/SerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -d
-echo
-
-echo Write Serial1, Read NonSerial1
-rm -f A.java     
-cp ${TESTSRC}/SerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java 
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/NonSerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -doe
-echo
-
-echo Write Serial1, Read Serial2
-rm -f A.java     
-cp ${TESTSRC}/SerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java 
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/SerialA_2.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -d
-echo
-
-echo Write Serial2, Read Serial1
-rm -f A.java     
-cp ${TESTSRC}/SerialA_2.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java 
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/SerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -d
-echo
-
-echo Write Serial1, Read Serial3
-rm -f A.java     
-cp ${TESTSRC}/SerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java 
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/SerialA_3.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -de
-echo
-
-echo Write Serial3, Read Serial1
-rm -f A.java     
-cp ${TESTSRC}/SerialA_3.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java 
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -s A
-rm -f A.java     
-cp ${TESTSRC}/SerialA_1.java A.java
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} A.java
-${TESTJAVA}/bin/java ${TESTVMOPTS} Test -de
-echo
-
-echo Passed
--- a/jdk/test/java/lang/Class/forName/modules/TestDriver.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/Class/forName/modules/TestDriver.java	Wed Jul 05 23:36:51 2017 +0200
@@ -30,6 +30,7 @@
 import java.util.stream.Stream;
 
 import jdk.test.lib.util.FileUtils;
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeClass;
@@ -42,7 +43,8 @@
  * @summary Tests for Class.forName(Module,String)
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build TestDriver CompilerUtils jdk.testlibrary.ProcessTools TestMain TestLayer
+ * @build jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.ProcessTools
+ *        TestDriver TestMain TestLayer
  * @run testng TestDriver
  */
 
--- a/jdk/test/java/lang/Class/getResource/ResourcesTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/Class/getResource/ResourcesTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -25,6 +25,7 @@
 import java.nio.file.Paths;
 
 import static jdk.testlibrary.ProcessTools.executeTestJava;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -32,9 +33,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build ResourcesTest CompilerUtils jdk.testlibrary.*
+ * @build ResourcesTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng ResourcesTest
  * @summary Driver for basic test of Class getResource and getResourceAsStream
  */
--- a/jdk/test/java/lang/ClassLoader/getResource/modules/ResourcesTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/ClassLoader/getResource/modules/ResourcesTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -25,6 +25,7 @@
 import java.nio.file.Paths;
 
 import static jdk.testlibrary.ProcessTools.executeTestJava;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -33,9 +34,9 @@
 /**
  * @test
  * @bug 8087335
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build ResourcesTest CompilerUtils jdk.testlibrary.*
+ * @build ResourcesTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng ResourcesTest
  * @summary Driver for basic test of ClassLoader getResource and getResourceAsStream
  */
--- a/jdk/test/java/lang/ModuleLayer/LayerAndLoadersTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/ModuleLayer/LayerAndLoadersTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build LayerAndLoadersTest CompilerUtils ModuleUtils
+ * @build LayerAndLoadersTest jdk.test.lib.compiler.CompilerUtils ModuleUtils
  * @run testng LayerAndLoadersTest
  * @summary Tests for java.lang.ModuleLayer@defineModulesWithXXX methods
  */
@@ -48,6 +48,7 @@
 import java.util.ServiceLoader;
 import java.util.Set;
 import java.util.stream.Collectors;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/java/lang/ModuleTests/access/AccessTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/ModuleTests/access/AccessTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -26,6 +26,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.executeTestJava;
 
 import org.testng.annotations.BeforeTest;
@@ -34,9 +35,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build AccessTest CompilerUtils jdk.testlibrary.*
+ * @build AccessTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng AccessTest
  * @summary Driver for test that checks access to access to types in
  *          exported and non-exported packages.
--- a/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java	Wed Jul 05 23:36:51 2017 +0200
@@ -25,7 +25,7 @@
  * @test
  * @bug 6479237
  * @summary Basic test StackTraceElement with class loader names
- * @library lib /lib/testlibrary
+ * @library lib /lib/testlibrary /test/lib
  * @modules jdk.compiler
  * @build m1/* WithClassLoaderName
  * @run main/othervm m1/com.app.Main
@@ -39,6 +39,8 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
+
 import com.app.Utils;
 
 public class WithClassLoaderName {
--- a/jdk/test/java/lang/System/LoggerFinder/modules/Base.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/Base.java	Wed Jul 05 23:36:51 2017 +0200
@@ -33,6 +33,7 @@
 import java.util.stream.Stream;
 
 import jdk.testlibrary.JDKToolFinder;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import static jdk.testlibrary.ProcessTools.executeCommand;
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *               patched system module, or Xbootclasspath
  *          This test does not require existence of java.logging module,
  *          but require jdk.compiler module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm JDKLoggerForImageTest
  */
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *            2. clients are in named/unnamed module,
  *               patched system module, or Xbootclasspath
  *          This test DOES require existence of java.logging module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm JDKLoggerForJDKTest
  */
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *               patched system module, or Xbootclasspath
  *          This test does not require existence of java.logging module,
  *          but require jdk.compiler module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm LoggerInImageTest
  */
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *               patched system module, or Xbootclasspath
  *          This test does not require existence of java.logging module,
  *          but require jdk.compiler module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm NamedLoggerForImageTest
  */
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *               patched system module, or Xbootclasspath
  *          This test does not require existence of java.logging module,
  *          but require jdk.compiler module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm NamedLoggerForJDKTest
  */
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *               patched system module, or Xbootclasspath
  *          This test does not require existence of java.logging module,
  *          but require jdk.compiler module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm UnnamedLoggerForImageTest
  */
 
--- a/jdk/test/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -45,8 +45,8 @@
  *               patched system module, or Xbootclasspath
  *          This test does not require existence of java.logging module,
  *          but require jdk.compiler module
- * @library /lib/testlibrary
- * @build Base CompilerUtils jdk.testlibrary.*
+ * @library /lib/testlibrary /test/lib
+ * @build Base jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run main/othervm UnnamedLoggerForJDKTest
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/TestConstructorParameterAnnotations.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,252 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     8074977
+ * @summary Test consistency of annotations on constructor parameters
+ * @compile             TestConstructorParameterAnnotations.java
+ * @run main            TestConstructorParameterAnnotations
+ * @compile -parameters TestConstructorParameterAnnotations.java
+ * @run main            TestConstructorParameterAnnotations
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+/*
+ * Some constructor parameters are <em>mandated</em>; that is, they
+ * are not explicitly present in the source code, but required to be
+ * present by the Java Language Specification. In other cases, some
+ * constructor parameters are not present in the source, but are
+ * synthesized by the compiler as an implementation artifact. There is
+ * not a reliable mechanism to consistently determine whether or not
+ * a parameter is implicit or not.
+ *
+ * (Using the "-parameters" option to javac does emit the information
+ * needed to make a reliably determination, but the information is not
+ * present by default.)
+ *
+ * The lack of such a mechanism causes complications reading parameter
+ * annotations in some cases since annotations for parameters are
+ * written out for the parameters in the source code, but when reading
+ * annotations at runtime all the parameters, including implicit ones,
+ * are present.
+ */
+public class TestConstructorParameterAnnotations {
+    public static void main(String... args) {
+        int errors = 0;
+        Class<?>[] classes = {NestedClass0.class,
+                              NestedClass1.class,
+                              NestedClass2.class,
+                              NestedClass3.class,
+                              NestedClass4.class,
+                              StaticNestedClass0.class,
+                              StaticNestedClass1.class,
+                              StaticNestedClass2.class,
+                              StaticNestedClass3.class,
+                              StaticNestedClass4.class};
+
+        for (Class<?> clazz : classes) {
+            for (Constructor<?> ctor : clazz.getConstructors()) {
+                System.out.println(ctor);
+                errors += checkGetParameterAnnotations(clazz, ctor);
+                errors += checkGetParametersGetAnnotation(clazz, ctor);
+            }
+        }
+
+        if (errors > 0)
+            throw new RuntimeException(errors + " errors.");
+        return;
+    }
+
+    private static int checkGetParameterAnnotations(Class<?> clazz,
+                                                    Constructor<?> ctor) {
+        String annotationString =
+            Arrays.deepToString(ctor.getParameterAnnotations());
+        String expectedString =
+            clazz.getAnnotation(ExpectedGetParameterAnnotations.class).value();
+
+        if (!Objects.equals(annotationString, expectedString)) {
+            System.err.println("Annotation mismatch on " + ctor +
+                               "\n\tExpected:" + expectedString +
+                               "\n\tActual:  " + annotationString);
+            return 1;
+        }
+        return 0;
+    }
+
+    private static int checkGetParametersGetAnnotation(Class<?> clazz,
+                                                       Constructor<?> ctor) {
+        int errors = 0;
+        int i = 0;
+        ExpectedParameterAnnotations epa =
+            clazz.getAnnotation(ExpectedParameterAnnotations.class);
+
+        for (Parameter param : ctor.getParameters() ) {
+            String annotationString =
+                Objects.toString(param.getAnnotation(MarkerAnnotation.class));
+            String expectedString = epa.value()[i];
+
+            if (!Objects.equals(annotationString, expectedString)) {
+                System.err.println("Annotation mismatch on " + ctor +
+                                   " on param " + param +
+                                   "\n\tExpected:" + expectedString +
+                                   "\n\tActual:  " + annotationString);
+                errors++;
+            }
+            i++;
+        }
+        return errors;
+    }
+
+    @ExpectedGetParameterAnnotations("[[]]")
+    @ExpectedParameterAnnotations({"null"})
+    public class NestedClass0 {
+        public NestedClass0() {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[], " +
+        "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)]]")
+    @ExpectedParameterAnnotations({
+        "null",
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)"})
+    public class NestedClass1 {
+        public NestedClass1(@MarkerAnnotation(1) int parameter) {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[], " +
+        "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)], " +
+        "[]]")
+    @ExpectedParameterAnnotations({
+        "null",
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)",
+        "null"})
+    public class NestedClass2 {
+        public NestedClass2(@MarkerAnnotation(2) int parameter1,
+                            int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[], " +
+        "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)], " +
+        "[]]")
+    @ExpectedParameterAnnotations({
+        "null",
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)",
+            "null"})
+    public class NestedClass3 {
+        public <P> NestedClass3(@MarkerAnnotation(3) P parameter1,
+                                int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[], " +
+        "[@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)], " +
+        "[]]")
+    @ExpectedParameterAnnotations({
+        "null",
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)",
+        "null"})
+    public class NestedClass4 {
+        public <P, Q> NestedClass4(@MarkerAnnotation(4) P parameter1,
+                                   Q parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[]")
+    @ExpectedParameterAnnotations({"null"})
+    public static class StaticNestedClass0 {
+        public StaticNestedClass0() {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)]]")
+    @ExpectedParameterAnnotations({
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=1)"})
+    public static class StaticNestedClass1 {
+        public StaticNestedClass1(@MarkerAnnotation(1) int parameter) {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)], " +
+        "[]]")
+    @ExpectedParameterAnnotations({
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=2)",
+        "null"})
+    public static class StaticNestedClass2 {
+        public StaticNestedClass2(@MarkerAnnotation(2) int parameter1,
+                            int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)], " +
+        "[]]")
+    @ExpectedParameterAnnotations({
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=3)",
+        "null"})
+    public static class StaticNestedClass3 {
+        public <P> StaticNestedClass3(@MarkerAnnotation(3) P parameter1,
+                                      int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations(
+        "[[@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)], " +
+        "[]]")
+    @ExpectedParameterAnnotations({
+        "@TestConstructorParameterAnnotations$MarkerAnnotation(value=4)",
+        "null"})
+    public static class StaticNestedClass4 {
+        public <P, Q> StaticNestedClass4(@MarkerAnnotation(4) P parameter1,
+                                         Q parameter2) {}
+    }
+
+    @Target(ElementType.PARAMETER)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface MarkerAnnotation {
+        int value();
+    }
+
+    /**
+     * String form of expected value of calling
+     * getParameterAnnotations on a constructor.
+     */
+    @Target(ElementType.TYPE)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface ExpectedGetParameterAnnotations {
+        String value();
+    }
+
+    /**
+     * String form of expected value of calling
+     * getAnnotation(MarkerAnnotation.class) on each element of the
+     * result of getParameters() on a constructor.
+     */
+    @Target(ElementType.TYPE)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface ExpectedParameterAnnotations {
+        String[] value();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/typeAnnotations/TestConstructorParameterTypeAnnotations.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     8074977
+ * @summary Test consistency of annotations on constructor parameters
+ * @compile             TestConstructorParameterTypeAnnotations.java
+ * @run main            TestConstructorParameterTypeAnnotations
+ * @compile -parameters TestConstructorParameterTypeAnnotations.java
+ * @run main            TestConstructorParameterTypeAnnotations
+ */
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+/*
+ * Some constructor parameters are <em>mandated</em>; that is, they
+ * are not explicitly present in the source code, but required to be
+ * present by the Java Language Specification. In other cases, some
+ * constructor parameters are not present in the source, but are
+ * synthesized by the compiler as an implementation artifact. There is
+ * not a reliable mechanism to consistently determine whether or not
+ * a parameter is implicit or not.
+ *
+ * (Using the "-parameters" option to javac does emit the information
+ * needed to make a reliably determination, but the information is not
+ * present by default.)
+ *
+ * The lack of such a mechanism causes complications reading parameter
+ * annotations in some cases since annotations for parameters are
+ * written out for the parameters in the source code, but when reading
+ * annotations at runtime all the parameters, including implicit ones,
+ * are present.
+ */
+public class TestConstructorParameterTypeAnnotations {
+    public static void main(String... args) {
+        int errors = 0;
+        Class<?>[] classes = {NestedClass0.class,
+                              NestedClass1.class,
+                              NestedClass2.class,
+                              NestedClass3.class,
+                              NestedClass4.class,
+                              StaticNestedClass0.class,
+                              StaticNestedClass1.class,
+                              StaticNestedClass2.class };
+
+        for (Class<?> clazz : classes) {
+            for (Constructor<?> ctor : clazz.getConstructors()) {
+                System.out.println(ctor);
+                errors += checkGetParameterAnnotations(clazz, ctor);
+                errors += checkGetAnnotatedParametersGetAnnotation(clazz, ctor);
+            }
+        }
+
+        if (errors > 0)
+            throw new RuntimeException(errors + " errors.");
+        return;
+    }
+
+    private static int checkGetParameterAnnotations(Class<?> clazz,
+                                                    Constructor<?> ctor) {
+        String annotationString =
+            Arrays.deepToString(ctor.getParameterAnnotations());
+        String expectedString =
+            clazz.getAnnotation(ExpectedGetParameterAnnotations.class).value();
+
+        if (!Objects.equals(annotationString, expectedString)) {
+            System.err.println("Annotation mismatch on " + ctor +
+                               "\n\tExpected:" + expectedString +
+                               "\n\tActual:  " + annotationString);
+            return 1;
+        }
+        return 0;
+    }
+
+    private static int checkGetAnnotatedParametersGetAnnotation(Class<?> clazz,
+                                                       Constructor<?> ctor) {
+        int errors = 0;
+        int i = 0;
+        ExpectedParameterTypeAnnotations epa =
+            clazz.getAnnotation(ExpectedParameterTypeAnnotations.class);
+
+        for (AnnotatedType param : ctor.getAnnotatedParameterTypes() ) {
+            String annotationString =
+                Objects.toString(param.getAnnotation(MarkerTypeAnnotation.class));
+            String expectedString = epa.value()[i];
+
+            if (!Objects.equals(annotationString, expectedString)) {
+                System.err.println("Annotation mismatch on " + ctor +
+                                   " on param " + param +
+                                   "\n\tExpected:" + expectedString +
+                                   "\n\tActual:  " + annotationString);
+                errors++;
+            }
+            i++;
+        }
+        return errors;
+    }
+
+    @ExpectedGetParameterAnnotations("[[]]")
+    @ExpectedParameterTypeAnnotations({"null"})
+    public class NestedClass0 {
+        public NestedClass0() {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], []]")
+    @ExpectedParameterTypeAnnotations({
+        "null",
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=1)"})
+    public class NestedClass1 {
+        public NestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], [], []]")
+    @ExpectedParameterTypeAnnotations({
+        "null",
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=2)",
+        "null"})
+    public class NestedClass2 {
+        public NestedClass2(@MarkerTypeAnnotation(2) int parameter1,
+                            int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], [], []]")
+    @ExpectedParameterTypeAnnotations({
+        "null",
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=3)",
+        "null"})
+    public class NestedClass3 {
+        public <P> NestedClass3(@MarkerTypeAnnotation(3) P parameter1,
+                                int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], [], []]")
+    @ExpectedParameterTypeAnnotations({
+        "null",
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=4)",
+        "null"})
+    public class NestedClass4 {
+        public <P, Q> NestedClass4(@MarkerTypeAnnotation(4) P parameter1,
+                                   Q parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[]")
+    @ExpectedParameterTypeAnnotations({"null"})
+    public static class StaticNestedClass0 {
+        public StaticNestedClass0() {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[]]")
+    @ExpectedParameterTypeAnnotations({
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=1)"})
+    public static class StaticNestedClass1 {
+        public StaticNestedClass1(@MarkerTypeAnnotation(1) int parameter) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], []]")
+    @ExpectedParameterTypeAnnotations({
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=2)",
+        "null"})
+    public static class StaticNestedClass2 {
+        public StaticNestedClass2(@MarkerTypeAnnotation(2) int parameter1,
+                                  int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], []]")
+    @ExpectedParameterTypeAnnotations({
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=3)",
+        "null"})
+    public static class StaticNestedClass3 {
+         public <P> StaticNestedClass3(@MarkerTypeAnnotation(3) P parameter1,
+                                      int parameter2) {}
+    }
+
+    @ExpectedGetParameterAnnotations("[[], []]")
+    @ExpectedParameterTypeAnnotations({
+        "@TestConstructorParameterTypeAnnotations$MarkerTypeAnnotation(value=4)",
+        "null"})
+    public static class StaticNestedClass4 {
+        public <P, Q> StaticNestedClass4(@MarkerTypeAnnotation(4) P parameter1,
+                                         Q parameter2) {}
+    }
+
+    @Target(ElementType.TYPE_USE)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface MarkerTypeAnnotation {
+        int value();
+    }
+
+    /**
+     * String form of expected value of calling
+     * getParameterAnnotations on a constructor.
+     */
+    @Target(ElementType.TYPE)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface ExpectedGetParameterAnnotations {
+        String value();
+    }
+
+    /**
+     * String form of expected value of calling
+     * getAnnotation(MarkerTypeAnnotation.class) on each element of the
+     * result of getParameters() on a constructor.
+     */
+    @Target(ElementType.TYPE)
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface ExpectedParameterTypeAnnotations {
+        String[] value();
+    }
+}
--- a/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/module/ModuleReader/ModuleReaderTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -23,10 +23,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules java.base/jdk.internal.module
  *          jdk.compiler
- * @build ModuleReaderTest CompilerUtils JarUtils
+ * @build ModuleReaderTest jdk.test.lib.compiler.CompilerUtils JarUtils
  * @run testng ModuleReaderTest
  * @summary Basic tests for java.lang.module.ModuleReader
  */
@@ -53,6 +53,7 @@
 import java.util.spi.ToolProvider;
 
 import jdk.internal.module.ModulePath;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -29,6 +29,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.executeTestJava;
 
 import org.testng.annotations.BeforeTest;
@@ -37,9 +38,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build ProxyClassAccessTest q.NP CompilerUtils jdk.testlibrary.*
+ * @build ProxyClassAccessTest q.NP jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng ProxyClassAccessTest
  * @summary Driver for testing proxy class doesn't have access to
  *          types referenced by proxy interfaces
--- a/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/reflect/Proxy/ProxyLayerTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -29,6 +29,7 @@
 import java.nio.file.Paths;
 import java.util.Arrays;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.executeTestJava;
 
 import org.testng.annotations.BeforeTest;
@@ -37,9 +38,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build ProxyTest CompilerUtils jdk.testlibrary.ProcessTools
+ * @build ProxyTest jdk.testlibrary.ProcessTools
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng ProxyLayerTest
  * @summary Test proxies to implement interfaces in a layer
  */
--- a/jdk/test/java/lang/reflect/Proxy/ProxyTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/lang/reflect/Proxy/ProxyTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -26,6 +26,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.executeTestJava;
 
 import org.testng.annotations.BeforeTest;
@@ -34,9 +35,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build ProxyTest q.U CompilerUtils jdk.testlibrary.*
+ * @build ProxyTest q.U jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng ProxyTest
  * @summary Driver for testing proxies accessing interfaces in named modules
  */
--- a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -30,7 +30,7 @@
  * @library ../../../../com/sun/net/httpserver
  *          /lib/testlibrary
  *          /test/lib
- * @build FileServerHandler JarUtils CompilerUtils
+ * @build FileServerHandler JarUtils jdk.test.lib.compiler.CompilerUtils
  * @run main/othervm CloseTest
  * @summary URL-downloaded jar files can consume all available file descriptors
  */
@@ -45,6 +45,8 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
+
 import com.sun.net.httpserver.HttpContext;
 import com.sun.net.httpserver.HttpServer;
 
--- a/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java	Wed Jul 05 23:36:51 2017 +0200
@@ -26,7 +26,7 @@
  * @bug 6899919
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build JarUtils CompilerUtils
+ * @build JarUtils jdk.test.lib.compiler.CompilerUtils
  * @run main/othervm GetResourceAsStream
  */
 
@@ -40,6 +40,7 @@
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.nio.file.StandardOpenOption;
+import jdk.test.lib.compiler.CompilerUtils;
 
 public class GetResourceAsStream extends Common {
     private static  final String WORK_DIR = System.getProperty("user.dir");
--- a/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -25,8 +25,8 @@
  * @test
  * @bug 8153665
  * @summary Test two URLClassLoader define Package object of the same name
- * @library /lib/testlibrary
- * @build CompilerUtils
+ * @library /test/lib
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @modules jdk.compiler
  * @run testng SplitPackage
  */
@@ -38,6 +38,7 @@
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.util.jar.Manifest;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -62,12 +62,14 @@
      * once (socket's send buffer filled up).
      */
     private final CountDownLatch writeStall = new CountDownLatch(1);
+    private final CountDownLatch initialWriteStall = new CountDownLatch(1);
 
     /*
      * This one works similarly by providing means to ensure a read from the
      * channel will stall at least once (no more data available on the socket).
      */
     private final CountDownLatch readStall = new CountDownLatch(1);
+    private final CountDownLatch initialReadStall = new CountDownLatch(1);
 
     private final AtomicInteger writeHandles = new AtomicInteger();
     private final AtomicInteger readHandles = new AtomicInteger();
@@ -79,7 +81,9 @@
         try (ServerSocket server = new ServerSocket(0)) {
             int port = server.getLocalPort();
             new TestServer(server).start();
+
             final RawChannel chan = channelOf(port);
+            initialWriteStall.await();
 
             // It's very important not to forget the initial bytes, possibly
             // left from the HTTP thingy
@@ -87,6 +91,12 @@
             print("RawChannel has %s initial bytes", initialBytes);
             clientRead.addAndGet(initialBytes);
 
+            // tell the server we have read the initial bytes, so
+            // that it makes sure there is something for us to
+            // read next in case the initialBytes have already drained the
+            // channel dry.
+            initialReadStall.countDown();
+
             chan.registerEvent(new RawChannel.RawEvent() {
 
                 private final ByteBuffer reusableBuffer = ByteBuffer.allocate(32768);
@@ -162,7 +172,7 @@
                         total += r;
                         clientRead.addAndGet(r);
                     }
-                    print("OP_READ read %s bytes", total);
+                    print("OP_READ read %s bytes (%s total)", total, clientRead.get());
                 }
             });
             exit.await(); // All done, we need to compare results:
@@ -234,6 +244,14 @@
                 throws IOException
         {
             os.write("HTTP/1.1 200 OK\r\nContent-length: 0\r\n\r\n".getBytes());
+
+            // write some initial bytes
+            byte[] initial = byteArrayOfSize(1024);
+            os.write(initial);
+            os.flush();
+            serverWritten.addAndGet(initial.length);
+            initialWriteStall.countDown();
+
             byte[] buf = new byte[1024];
             String s = "";
             while (true) {
@@ -252,12 +270,25 @@
             byte[] first = byteArrayOfSize(1024);
             long total = first.length;
             os.write(first);
+            os.flush();
+
+            // wait until initial bytes were read
+            initialReadStall.await();
+
+            // make sure there is something to read, otherwise readStall
+            // will never be counted down.
+            first = byteArrayOfSize(1024);
+            os.write(first);
+            os.flush();
+            total += first.length;
+
             // Let's wait for the signal from the raw channel that its read has
             // stalled, and then continue sending a bit more stuff
             readStall.await();
             for (int i = 0; i < 32; i++) {
                 byte[] b = byteArrayOfSize(1024);
                 os.write(b);
+                os.flush();
                 total += b.length;
                 TimeUnit.MILLISECONDS.sleep(1);
             }
@@ -265,7 +296,7 @@
         }
 
         private long readSlowly(InputStream is) throws Exception {
-            // Wait for the raw channel to fill up the its send buffer
+            // Wait for the raw channel to fill up its send buffer
             writeStall.await();
             long overall = 0;
             byte[] array = new byte[1024];
--- a/jdk/test/java/nio/channels/Selector/LotsOfUpdates.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/nio/channels/Selector/LotsOfUpdates.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -21,8 +21,10 @@
  * questions.
  */
 
-import java.nio.channels.*;
 import java.io.IOException;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.SocketChannel;
 
 public class LotsOfUpdates {
     public static void main(String[] args) throws IOException {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6824477
+ * @summary Selector.select can fail with IOException "Invalid argument" on
+ *     Solaris if maximum number of file descriptors is less than 10000
+ * @requires (os.family != "windows")
+ * @library /test/lib
+ * @build LotsOfUpdates
+ * @run main LotsOfUpdatesTest
+ */
+
+import jdk.test.lib.process.ProcessTools;
+
+public class LotsOfUpdatesTest {
+
+    //hard limit needs to be less than 10000 for this bug
+    private static final String ULIMIT_SET_CMD = "ulimit -n 2048";
+
+    private static final String JAVA_CMD = ProcessTools.getCommandLine(
+            ProcessTools.createJavaProcessBuilder(LotsOfUpdates.class.getName()));
+
+    public static void main(String[] args) throws Throwable {
+        ProcessTools.executeCommand("sh", "-c", ULIMIT_SET_CMD + " && " + JAVA_CMD)
+                    .shouldHaveExitValue(0);
+    }
+}
--- a/jdk/test/java/nio/channels/Selector/lots_of_updates.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
-# 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 6824477
-# @summary Selector.select can fail with IOException "Invalid argument" on
-#     Solaris if maximum number of file descriptors is less than 10000
-# @build LotsOfUpdates
-# @run shell lots_of_updates.sh
-
-OS=`uname -s`
-case "$OS" in
-    Windows_* | CYGWIN* )
-        echo "ulimit not on Windows"
-        exit 0
-        ;;
-    * )
-        CLASSPATH=${TESTCLASSES}:${TESTSRC}
-        ;;
-esac
-export CLASSPATH
-
-# hard limit needs to be less than 10000 for this bug
-NOFILES=`ulimit -n -H`
-if [ "$NOFILES" = "unlimited" ] || [ $NOFILES -ge 10000 ]; then
-    ulimit -n 2048
-fi
-
-${TESTJAVA}/bin/java ${TESTVMOPTS} LotsOfUpdates
--- a/jdk/test/java/nio/channels/SocketChannel/Open.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/nio/channels/SocketChannel/Open.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,16 +21,11 @@
  * questions.
  */
 
-/* @test
- * @bug 4614065
- * @summary Test SocketChannel gc after running out of fds
- * @build Open
- * @run shell Open.sh
- */
-
-import java.net.*;
-import java.nio.*;
-import java.nio.channels.*;
+import java.net.SocketException;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.Pipe;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 import java.nio.channels.spi.SelectorProvider;
 
 public class Open {
--- a/jdk/test/java/nio/channels/SocketChannel/Open.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
-# 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.
-#
-
-#
-
-    OS=`uname -s`
-    case "$OS" in
-        SunOS )
-            ulimit -n 100
-            $TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES Open ;;
-        * )
-            echo "unrecognized system: $OS" ;;
-    esac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/channels/SocketChannel/OpenSocketChannelTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4614065
+ * @summary Test SocketChannel gc after running out of fds
+ * @requires (os.family == "solaris")
+ * @library /test/lib
+ * @build Open
+ * @run main OpenSocketChannelTest
+ */
+
+import jdk.test.lib.process.ProcessTools;
+
+public class OpenSocketChannelTest {
+
+    //hard limit needs to be small for this bug
+    private static final String ULIMIT_SET_CMD = "ulimit -n 100";
+
+    private static final String JAVA_CMD = ProcessTools.getCommandLine(
+            ProcessTools.createJavaProcessBuilder(Open.class.getName()));
+
+    public static void main(String[] args) throws Throwable {
+        ProcessTools.executeCommand("sh", "-c", ULIMIT_SET_CMD + " && " + JAVA_CMD)
+                    .shouldHaveExitValue(0);
+    }
+}
--- a/jdk/test/java/nio/file/Files/DeleteOnClose.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/nio/file/Files/DeleteOnClose.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -21,20 +21,53 @@
  * questions.
  */
 
-import java.nio.file.*;
-import static java.nio.file.StandardOpenOption.*;
-import java.io.*;
-import java.util.*;
+/*
+ * @test
+ * @bug 4313887
+ * @summary Unit test for DELETE_ON_CLOSE open option
+ * @library /test/lib ..
+ */
+
+import java.io.IOException;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.OpenOption;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SecureDirectoryStream;
+import java.util.HashSet;
+import java.util.Set;
+
+import jdk.test.lib.process.ProcessTools;
+
+import static java.nio.file.StandardOpenOption.READ;
+import static java.nio.file.StandardOpenOption.WRITE;
+import static java.nio.file.StandardOpenOption.DELETE_ON_CLOSE;
 
 public class DeleteOnClose {
 
-    public static void main(String[] args) throws IOException {
-        // open file but do not close it. Its existance will be checked by
-        // the calling script.
-        Files.newByteChannel(Paths.get(args[0]), READ, WRITE, DELETE_ON_CLOSE);
+    public static void main(String[] args) throws Exception {
+        if (args.length == 0) {
+            Path file = Files.createTempFile("blah", "tmp");
+            ProcessTools.executeTestJava(DeleteOnClose.class.getName(),
+                                         file.toAbsolutePath().toString())
+                        .shouldHaveExitValue(0);
+            runTest(file);
+        } else {
+            // open file but do not close it. Its existance will be checked by
+            // the caller.
+            Files.newByteChannel(Paths.get(args[0]), READ, WRITE, DELETE_ON_CLOSE);
+        }
+    }
+
+    public static void runTest(Path path) throws Exception {
+        // check temporary file has been deleted after jvm termination
+        if (Files.exists(path)) {
+            throw new RuntimeException("Temporary file was not deleted");
+        }
 
         // check temporary file has been deleted after closing it
-        Path file = Files.createTempFile("blah", "tmp");
+        Path file = Files.createTempFile("blep", "tmp");
         Files.newByteChannel(file, READ, WRITE, DELETE_ON_CLOSE).close();
         if (Files.exists(file))
             throw new RuntimeException("Temporary file was not deleted");
--- a/jdk/test/java/nio/file/Files/delete_on_close.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
-# 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 4313887
-# @summary Unit test for DELETE_ON_CLOSE open option
-# @library ..
-# @build DeleteOnClose
-# @run shell delete_on_close.sh
-
-# if TESTJAVA isn't set then we assume an interactive run.
-
-if [ -z "$TESTJAVA" ]; then
-    TESTSRC=.
-    TESTCLASSES=.
-    JAVA=java
-else
-    JAVA="${TESTJAVA}/bin/java"
-fi
-
-OS=`uname -s`
-case "$OS" in
-    Windows_* | CYGWIN* )
-        CLASSPATH="${TESTCLASSES};${TESTSRC}"
-        ;;
-    * )
-        CLASSPATH=${TESTCLASSES}:${TESTSRC}
-        ;;
-esac
-export CLASSPATH
-
-TMPFILE="$$.tmp"
-touch $TMPFILE
-$JAVA ${TESTVMOPTS} DeleteOnClose $TMPFILE 2>&1
-if [ $? != 0 ]; then exit 1; fi
-if [ -f $TMPFILE ]; then
-    echo "$TMPFILE was not deleted"
-    exit 1
-fi
-
-exit 0
--- a/jdk/test/java/rmi/module/ModuleTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/rmi/module/ModuleTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @build jdk.testlibrary.ProcessTools
- *        ModuleTest CompilerUtils JarUtils
+ *        ModuleTest jdk.test.lib.compiler.CompilerUtils JarUtils
  * @run testng ModuleTest
  * @summary Basic tests for using rmi in module world
  */
@@ -36,6 +36,7 @@
 
 import java.io.File;
 import java.nio.file.Paths;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/java/security/Provider/SecurityProviderModularTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/security/Provider/SecurityProviderModularTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -33,6 +33,7 @@
 import java.lang.module.ModuleDescriptor;
 import jdk.testlibrary.ProcessTools;
 import jdk.testlibrary.OutputAnalyzer;
+import jdk.test.lib.compiler.CompilerUtils;
 import org.testng.annotations.BeforeTest;
 
 /**
@@ -40,8 +41,9 @@
  * @bug 8130360
  * @library /lib/testlibrary
  * @library /java/security/modules
+ * @library /test/lib
  * @modules java.base/jdk.internal.module
- * @build CompilerUtils JarUtils
+ * @build jdk.test.lib.compiler.CompilerUtils JarUtils
  * @summary Test custom security provider module with all possible modular
  *          condition. The test includes different combination of security
  *          client/provider modules interaction with or without service
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Calendar/Bug8176847.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8176847
+ * @summary Make sure that style value of '3' throws IllegalArgumentException
+ *          in Calendar.getDisplayName(s) methods.
+ */
+
+import java.util.Calendar;
+import java.util.Locale;
+
+public class Bug8176847 {
+    public static void main(String[] args) {
+        Calendar c = new Calendar.Builder().build();
+
+        try {
+            c.getDisplayName(Calendar.MONTH, 3, Locale.US);
+            throw new RuntimeException("IllegalArgumentException was not thrown");
+        } catch (IllegalArgumentException iae) {
+            // success
+        }
+
+        try {
+            c.getDisplayNames(Calendar.MONTH, 3, Locale.US);
+            throw new RuntimeException("IllegalArgumentException was not thrown");
+        } catch (IllegalArgumentException iae) {
+            // success
+        }
+    }
+}
--- a/jdk/test/java/util/Locale/LocaleEnhanceTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/util/Locale/LocaleEnhanceTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -44,7 +44,7 @@
 /**
  * @test
  * @bug 6875847 6992272 7002320 7015500 7023613 7032820 7033504 7004603
- *    7044019 8008577
+ *    7044019 8008577 8176853
  * @summary test API changes to Locale
  * @library /java/text/testlib
  * @modules jdk.localedata
@@ -1032,6 +1032,7 @@
 
         // null attribute throws NPE
         new BuilderNPE("null attribute") { public void call() { b.addUnicodeLocaleAttribute(null); }};
+        new BuilderNPE("null attribute removal") { public void call() { b.removeUnicodeLocaleAttribute(null); }};
 
         // illformed attribute throws IllformedLocaleException
         new BuilderILE("invalid attribute") { public void call() { b.addUnicodeLocaleAttribute("ca"); }};
--- a/jdk/test/java/util/ResourceBundle/modules/cache/CacheTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/util/ResourceBundle/modules/cache/CacheTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -24,9 +24,9 @@
 /**
  * @test
  * @bug 8170772
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build CacheTest CompilerUtils jdk.testlibrary.*
+ * @build CacheTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng CacheTest
  */
 
@@ -37,12 +37,12 @@
 
 import jdk.testlibrary.OutputAnalyzer;
 import static jdk.testlibrary.ProcessTools.*;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import static org.testng.Assert.*;
 
-
 @Test
 public class CacheTest {
 
--- a/jdk/test/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/util/ResourceBundle/modules/casesensitive/CaseInsensitiveNameClash.java	Wed Jul 05 23:36:51 2017 +0200
@@ -24,9 +24,10 @@
 /*
  * @test
  * @bug 8177980
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build CompilerUtils jdk.testlibrary.ProcessTools CaseInsensitiveNameClash
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.testlibrary.ProcessTools CaseInsensitiveNameClash
  * @run testng CaseInsensitiveNameClash
  */
 
@@ -34,6 +35,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import jdk.testlibrary.ProcessTools;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/java/util/ResourceBundle/modules/security/TestPermission.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/util/ResourceBundle/modules/security/TestPermission.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -26,6 +26,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.executeTestJava;
 
 import org.testng.annotations.BeforeTest;
@@ -34,9 +35,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build TestPermission CompilerUtils jdk.testlibrary.*
+ * @build TestPermission jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng TestPermission
  * @summary Driver for testing ResourceBundle::getBundle(String, Module)
  */
--- a/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/util/ServiceLoader/modules/BadProvidersTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng/othervm BadProvidersTest
  * @summary Basic test of ServiceLoader with bad provider and bad provider
  *          factories deployed on the module path
@@ -44,6 +44,8 @@
 import java.util.Set;
 import java.util.stream.Collectors;
 
+import jdk.test.lib.compiler.CompilerUtils;
+
 import org.testng.annotations.Test;
 import org.testng.annotations.DataProvider;
 import static org.testng.Assert.*;
--- a/jdk/test/java/util/logging/modules/GetResourceBundleTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/java/util/logging/modules/GetResourceBundleTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,15 +30,17 @@
 
 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
 import static jdk.testlibrary.ProcessTools.*;
+import jdk.test.lib.compiler.CompilerUtils;
 import static org.testng.Assert.*;
 
 /**
  * @test
  * @bug 8129126 8136802 8137316 8137317 8136804 8139350
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  *          java.logging
- * @build GetResourceBundleTest CompilerUtils jdk.testlibrary.ProcessTools
+ * @build GetResourceBundleTest jdk.testlibrary.ProcessTools
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng GetResourceBundleTest
  * @summary Tests Logger.getLogger + logger.getResourceBundle in an named/unnamed module,
  *          resources are in named and unnamed modules respectively.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AllowSearch.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4420318
+ * @summary Checks that an IllegalStateException is thrown by getNumImages(true)
+ *          when seekForwardOnly is true
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ *          java.desktop/com.sun.imageio.plugins.jpeg
+ *          java.desktop/com.sun.imageio.plugins.png
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+
+import com.sun.imageio.plugins.gif.GIFImageReader;
+import com.sun.imageio.plugins.jpeg.JPEGImageReader;
+import com.sun.imageio.plugins.png.PNGImageReader;
+
+public class AllowSearch {
+
+    private static void test(ImageReader reader, String format)
+        throws IOException {
+        File f = File.createTempFile("imageio", ".tmp");
+        ImageInputStream stream = ImageIO.createImageInputStream(f);
+        reader.setInput(stream, true);
+
+        boolean gotISE = false;
+        try {
+            int numImages = reader.getNumImages(true);
+        } catch (IOException ioe) {
+            gotISE = false;
+        } catch (IllegalStateException ise) {
+            gotISE = true;
+        }
+
+        if (!gotISE) {
+            throw new RuntimeException("Failed to get desired exception for " +
+                                       format + " reader!");
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+        ImageReader gifReader = new GIFImageReader(null);
+        ImageReader jpegReader = new JPEGImageReader(null);
+        ImageReader pngReader = new PNGImageReader(null);
+
+        test(gifReader, "GIF");
+        test(jpegReader, "JPEG");
+        test(pngReader, "PNG");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AppContextTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4421190
+ * @summary Tests that Image I/O statics may be referenced properly from
+ *          multiple AppContexts, as would be the case for multiple Applets in a
+ *          single VM. Each AppContext should get its own copy of the registry
+ *          and the caching parameters in the ImageIO class.
+ * @modules java.desktop/sun.awt
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.spi.IIORegistry;
+
+import sun.awt.SunToolkit;
+
+class TestThread extends Thread {
+
+    IIORegistry registry;
+    boolean useCache;
+    File cacheDirectory;
+    boolean cacheSettingsOK = false;
+    String threadName;
+
+    boolean gotCrosstalk = false;
+
+    public TestThread(ThreadGroup tg,
+                      boolean useCache, File cacheDirectory,
+                      String threadName) {
+        super(tg, threadName);
+        this.useCache = useCache;
+        this.cacheDirectory = cacheDirectory;
+        this.threadName = threadName;
+    }
+
+    public void run() {
+//          System.out.println("Thread " + threadName + " in thread group " +
+//                             getThreadGroup().getName());
+
+        // Create a new AppContext as though we were an applet
+        SunToolkit.createNewAppContext();
+
+        // Get default registry and store reference
+        this.registry = IIORegistry.getDefaultInstance();
+
+        for (int i = 0; i < 10; i++) {
+//              System.out.println(threadName +
+//                                 ": setting cache parameters to " +
+//                                 useCache + ", " + cacheDirectory);
+            ImageIO.setUseCache(useCache);
+            ImageIO.setCacheDirectory(cacheDirectory);
+
+            try {
+                sleep(1000L);
+            } catch (InterruptedException e) {
+            }
+
+//              System.out.println(threadName + ": reading cache parameters");
+            boolean newUseCache = ImageIO.getUseCache();
+            File newCacheDirectory = ImageIO.getCacheDirectory();
+            if (newUseCache != useCache ||
+                newCacheDirectory != cacheDirectory) {
+//                  System.out.println(threadName + ": got " +
+//                                     newUseCache + ", " +
+//                                     newCacheDirectory);
+//                  System.out.println(threadName + ": crosstalk encountered!");
+                gotCrosstalk = true;
+            }
+        }
+    }
+
+    public IIORegistry getRegistry() {
+        return registry;
+    }
+
+    public boolean gotCrosstalk() {
+        return gotCrosstalk;
+    }
+}
+
+public class AppContextTest {
+
+    public AppContextTest() {
+        ThreadGroup tg0 = new ThreadGroup("ThreadGroup0");
+        ThreadGroup tg1 = new ThreadGroup("ThreadGroup1");
+
+        TestThread t0 =
+            new TestThread(tg0, false, null, "TestThread 0");
+        TestThread t1 =
+            new TestThread(tg1, true, new File("."), "TestThread 1");
+
+        t0.start();
+        t1.start();
+
+        try {
+            t0.join();
+        } catch (InterruptedException ie0) {
+        }
+        try {
+            t1.join();
+        } catch (InterruptedException ie1) {
+        }
+
+        if (t0.gotCrosstalk() || t1.gotCrosstalk()) {
+            throw new RuntimeException("ImageIO methods had crosstalk!");
+        }
+
+        if (t0.getRegistry() == t1.getRegistry()) {
+            throw new RuntimeException("ThreadGroups had same IIORegistry!");
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+        new AppContextTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AppletResourceTest.html	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,40 @@
+<!--
+  ~ Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+  ~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  ~
+  ~ This code is free software; you can redistribute it and/or modify it
+  ~ under the terms of the GNU General Public License version 2 only, as
+  ~ published by the Free Software Foundation.
+  ~
+  ~ This code is distributed in the hope that it will be useful, but WITHOUT
+  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  ~ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+  ~ version 2 for more details (a copy is included in the LICENSE file that
+  ~ accompanied this code).
+  ~
+  ~ You should have received a copy of the GNU General Public License version
+  ~ 2 along with this work; if not, write to the Free Software Foundation,
+  ~ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+  ~
+  ~ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+  ~ or visit www.oracle.com if you need additional information or have any
+  ~ questions.
+  -->
+
+<html>
+<!--
+ test
+ @bug 4481957
+ @run main AppletResourceTest
+ @run applet RestrictedBundleTest.html
+ @summary Tests that applet-supplied ImageReader, ImageWriter, and
+ IIOMetadataFormat implementations do not throw unexpected exceptions
+ when indirectly attempting to access ResourceBundles.
+  -->
+<head>
+<title> AppletResourceTest </title>
+</head>
+<body>
+<applet code=AppletResourceTest.class width=400 height=400></applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/AppletResourceTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4481957
+ * @key headful
+ * @summary Tests that applet-supplied ImageReader, ImageWriter, and
+ *          IIOMetadataFormat implementations do not throw unexpected exceptions
+ *          when indirectly attempting to access ResourceBundles
+ * @run main AppletResourceTest
+ * @run applet AppletResourceTest.html
+ */
+
+import java.applet.Applet;
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.ListResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.Vector;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.event.IIOReadWarningListener;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+
+import org.w3c.dom.Node;
+
+public class AppletResourceTest extends Applet {
+
+    public static void main(String[] argv) {
+        new AppletResourceTest().init();
+    }
+
+    public void init() {
+        DummyImageReaderImpl reader;
+        MyReadWarningListener listener = new MyReadWarningListener();
+        Locale[] locales = {new Locale("ru"),
+                            new Locale("fr"),
+                            new Locale("uk")};
+
+        reader = new DummyImageReaderImpl(new DummyImageReaderSpiImpl());
+        reader.setAvailableLocales(locales);
+        reader.setLocale(new Locale("fr"));
+        reader.addIIOReadWarningListener(listener);
+
+        String baseName = "AppletResourceTest$BugStats";
+        try {
+            reader.processWarningOccurred("WarningMessage");
+            reader.processWarningOccurred(baseName, "water");
+        } catch (MissingResourceException mre) {
+            throw new RuntimeException("Test failed: couldn't load resource");
+        }
+
+
+    }
+
+    private class MyReadWarningListener implements IIOReadWarningListener {
+        public void warningOccurred(ImageReader source,
+                                    String warning)
+            {
+                System.out.println("warning occurred: " + warning);
+            }
+    }
+
+    public static class BugStats extends ListResourceBundle {
+
+        public Object[][] getContents(){
+            return contents;
+        }
+
+        private Object[][] contents = {
+            {"coffee", new String("coffee from Stats class")},
+            {"tea", new String("tea from Stats class")},
+            {"water", new String("water from Stats class")}
+        };
+    }
+
+
+    public static class DummyImageReaderImpl extends ImageReader {
+
+        public DummyImageReaderImpl(ImageReaderSpi originatingProvider) {
+            super(originatingProvider);
+        }
+
+        public int getNumImages(boolean allowSearch) throws IOException {
+            return 5;
+        }
+
+        public int getWidth(int imageIndex) throws IOException {
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 5 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+
+            return 10;
+        }
+
+        public int getHeight(int imageIndex) throws IOException {
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 5 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+
+            return 15;
+        }
+
+        public Iterator getImageTypes(int imageIndex) throws IOException {
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 5 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+
+            Vector imageTypes = new Vector();
+            imageTypes.add(ImageTypeSpecifier.createFromBufferedImageType
+                           (BufferedImage.TYPE_BYTE_GRAY ));
+            return imageTypes.iterator();
+        }
+
+        public IIOMetadata getStreamMetadata() throws IOException {
+            return new DummyIIOMetadataImpl(true, null, null, null, null);
+        }
+
+        public IIOMetadata getImageMetadata(int imageIndex)
+          throws IOException {
+
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 5 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+            if (seekForwardOnly) {
+                if (imageIndex < minIndex)
+                    throw new IndexOutOfBoundsException();
+                minIndex = imageIndex;
+            }
+            return new DummyIIOMetadataImpl(true, null, null, null, null);
+        }
+
+
+        public BufferedImage read(int imageIndex, ImageReadParam param)
+          throws IOException {
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 5 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+            if (seekForwardOnly) {
+                if (imageIndex < minIndex)
+                    throw new IndexOutOfBoundsException();
+                minIndex = imageIndex;
+            }
+
+            return getDestination(param, getImageTypes(imageIndex), 10, 15);
+        }
+
+// protected  methods - now public
+
+        public  boolean abortRequested() {
+            return super.abortRequested();
+        }
+
+        public  void clearAbortRequest() {
+            super.clearAbortRequest();
+        }
+
+        public  void processImageComplete() {
+            super.processImageComplete();
+        }
+
+        public  void processImageProgress(float percentageDone) {
+            super.processImageProgress(percentageDone);
+        }
+
+        public  void processImageStarted(int imageIndex) {
+            super.processImageStarted(imageIndex);
+        }
+
+        public  void processImageUpdate(BufferedImage theImage,
+                                        int minX,
+                                        int minY,
+                                        int width,
+                                        int height,
+                                        int periodX,
+                                        int periodY,
+                                        int[] bands) {
+            super.processImageUpdate(theImage,
+                                     minX,
+                                     minY,
+                                     width,
+                                     height,
+                                     periodX,
+                                     periodY,
+                                     bands);
+        }
+
+        public  void processPassComplete(BufferedImage theImage) {
+            super. processPassComplete(theImage);
+        }
+
+        public  void processPassStarted(BufferedImage theImage,
+                                        int pass, int minPass,
+                                        int maxPass,
+                                        int minX,
+                                        int minY,
+                                        int periodX,
+                                        int periodY,
+                                        int[] bands) {
+            super.processPassStarted(theImage,
+                                     pass,
+                                     minPass,
+                                     maxPass,
+                                     minX,
+                                     minY,
+                                     periodX,
+                                     periodY,
+                                     bands);
+        }
+
+        public  void processReadAborted() {
+            super.processReadAborted();
+        }
+
+        public  void processSequenceComplete() {
+            super.processSequenceComplete();
+        }
+
+        public  void processSequenceStarted(int minIndex) {
+            super.processSequenceStarted(minIndex);
+        }
+
+        public  void processThumbnailComplete() {
+            super.processThumbnailComplete();
+        }
+
+        public  void processThumbnailPassComplete(BufferedImage theThumbnail) {
+            super.processThumbnailPassComplete(theThumbnail);
+        }
+
+        public  void processThumbnailPassStarted(BufferedImage theThumbnail,
+                                                 int pass,
+                                                 int minPass,
+                                                 int maxPass,
+                                                 int minX,
+                                                 int minY,
+                                                 int periodX,
+                                                 int periodY,
+                                                 int[] bands) {
+            super.processThumbnailPassStarted(theThumbnail,
+                                              pass,
+                                              minPass,
+                                              maxPass,
+                                              minX,
+                                              minY,
+                                              periodX,
+                                              periodY,
+                                              bands);
+        }
+
+        public  void processThumbnailProgress(float percentageDone) {
+            super.processThumbnailProgress(percentageDone);
+        }
+
+        public  void processThumbnailStarted(int imageIndex, int thumbnailIndex) {
+            super.processThumbnailStarted(imageIndex, thumbnailIndex);
+        }
+
+        public  void processThumbnailUpdate(BufferedImage theThumbnail,
+                                            int minX,
+                                            int minY,
+                                            int width,
+                                            int height,
+                                            int periodX,
+                                            int periodY,
+                                            int[] bands) {
+            super.processThumbnailUpdate(theThumbnail,
+                                         minX,
+                                         minY,
+                                         width,
+                                         height,
+                                         periodX,
+                                         periodY,
+                                         bands);
+        }
+
+        public  void processWarningOccurred(String warning) {
+            super.processWarningOccurred(warning);
+        }
+
+
+
+        public static Rectangle getSourceRegion(ImageReadParam param,
+                                                int srcWidth,
+                                                int srcHeight) {
+            return ImageReader.getSourceRegion(param, srcWidth, srcHeight);
+        }
+
+        public static void computeRegions(ImageReadParam param,
+                                          int srcWidth,
+                                          int srcHeight,
+                                          BufferedImage image,
+                                          Rectangle srcRegion,
+                                          Rectangle destRegion) {
+            ImageReader.computeRegions(param,
+                                       srcWidth,
+                                       srcHeight,
+                                       image,
+                                       srcRegion,
+                                       destRegion);
+        }
+
+        public static void checkReadParamBandSettings(ImageReadParam param,
+                                                      int numSrcBands,
+                                                      int numDstBands) {
+            ImageReader.checkReadParamBandSettings( param,
+                                                    numSrcBands,
+                                                    numDstBands);
+        }
+
+        public static BufferedImage getDestination(ImageReadParam param,
+                                                   Iterator imageTypes,
+                                                   int width,
+                                                   int height) throws IIOException {
+            return ImageReader.getDestination(param,
+                                              imageTypes,
+                                              width,
+                                              height);
+        }
+
+        public  void setAvailableLocales(Locale[] locales) {
+            if (locales == null || locales.length == 0)
+                availableLocales = null;
+            else
+                availableLocales = (Locale[])locales.clone();
+        }
+
+        public  void processWarningOccurred(String baseName, String keyword) {
+            super.processWarningOccurred(baseName, keyword);
+        }
+    }
+
+    public static class DummyIIOMetadataImpl extends IIOMetadata {
+
+        public DummyIIOMetadataImpl() {
+            super();
+        }
+
+        public DummyIIOMetadataImpl(boolean standardMetadataFormatSupported,
+                                    String nativeMetadataFormatName,
+                                    String nativeMetadataFormatClassName,
+                                    String[] extraMetadataFormatNames,
+                                    String[] extraMetadataFormatClassNames) {
+            super(standardMetadataFormatSupported,
+                  nativeMetadataFormatName,
+                  nativeMetadataFormatClassName,
+                  extraMetadataFormatNames,
+                  extraMetadataFormatClassNames);
+        }
+
+        public boolean isReadOnly() {
+            return true;
+        }
+
+        public Node getAsTree(String formatName) {
+            return null;
+        }
+
+        public void mergeTree(String formatName, Node root)
+          throws IIOInvalidTreeException {
+            throw new IllegalStateException();
+        }
+
+        public void reset() {
+            throw new IllegalStateException();
+        }
+    }
+
+    public static class DummyImageReaderSpiImpl extends ImageReaderSpi {
+
+        static final String[] names ={ "myformat" };
+
+        public DummyImageReaderSpiImpl() {
+            super("vendorName",
+                  "version",
+                  names,
+                  null,
+                  null,
+                  "DummyImageReaderImpl",
+                  STANDARD_INPUT_TYPE,
+                  null,
+                  true,
+                  null,
+                  null,
+                  null,
+                  null,
+                  true,
+                  null,
+                  null,
+                  null,
+                  null);
+        }
+        public boolean canDecodeInput(Object source)
+          throws IOException {
+            return true;
+        }
+        public ImageReader createReaderInstance(Object extension)
+          throws IOException {
+            return new DummyImageReaderImpl(this);
+        }
+        public String getDescription(Locale locale) {
+            return "DummyImageReaderSpiImpl";
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/GetNumImages.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4892609
+ * @summary Tests that the appropriate IllegalStateException is thrown if
+ *          ImageReader.getNumImages() is called with a null source or if
+ *          allowSearch is specified at the same time that seekForwardOnly is
+ *          true
+ */
+
+import java.io.ByteArrayInputStream;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.ImageInputStream;
+
+public class GetNumImages {
+
+    public static void main(String[] args) throws Exception {
+        IIORegistry registry = IIORegistry.getDefaultInstance();
+
+        // test ImageReader.getNumImages() for all available ImageReaders,
+        // with no source set
+        Iterator readerspis = registry.getServiceProviders(ImageReaderSpi.class,
+                                                           false);
+        while (readerspis.hasNext()) {
+            boolean caughtEx = false;
+            ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next();
+            ImageReader reader = readerspi.createReaderInstance();
+            try {
+                reader.getNumImages(false);
+            } catch (IllegalStateException ise) {
+                // caught exception, everything's okay
+                caughtEx = true;
+            }
+
+            if (!caughtEx) {
+                throw new RuntimeException("Test failed: exception was not " +
+                                           "thrown for null input: " +
+                                           reader);
+            }
+        }
+
+        // test ImageReader.getNumImages() for all available ImageReaders,
+        // with source set, seekForwardOnly and allowSearch both true
+        readerspis = registry.getServiceProviders(ImageReaderSpi.class,
+                                                  false);
+        while (readerspis.hasNext()) {
+            boolean caughtEx = false;
+            ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next();
+            ImageReader reader = readerspi.createReaderInstance();
+            byte[] barr = new byte[100];
+            ByteArrayInputStream bais = new ByteArrayInputStream(barr);
+            ImageInputStream iis = ImageIO.createImageInputStream(bais);
+            try {
+                reader.setInput(iis, true);
+                reader.getNumImages(true);
+            } catch (IllegalStateException ise) {
+                // caught exception, everything's okay
+                caughtEx = true;
+            }
+
+            if (!caughtEx) {
+                throw new RuntimeException("Test failed: exception was not " +
+                                           "thrown when allowSearch and " +
+                                           "seekForwardOnly are both true: " +
+                                           reader);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/GetReaderWriterInfo.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4703112
+ * @summary Verifies that ImageIO.getReaderFileSuffixes() and similar methods
+ *          return appropriate values
+ */
+
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+
+public class GetReaderWriterInfo {
+
+    private static void testGetReaderFormatNames() {
+        String[] names = ImageIO.getReaderFormatNames();
+        for (String n : names) {
+            Iterator<ImageReader> it = ImageIO.getImageReadersByFormatName(n);
+            if (!it.hasNext()) {
+                throw new RuntimeException("getReaderFormatNames returned " +
+                                           "an unknown name: " + n);
+            }
+        }
+    }
+
+    private static void testGetReaderMIMETypes() {
+        String[] types = ImageIO.getReaderMIMETypes();
+        for (String t : types) {
+            Iterator<ImageReader> it = ImageIO.getImageReadersByMIMEType(t);
+            if (!it.hasNext()) {
+                throw new RuntimeException("getReaderMIMETypes returned " +
+                                           "an unknown type: " + t);
+            }
+        }
+    }
+
+    private static void testGetReaderFileSuffixes() {
+        String[] suffixes = ImageIO.getReaderFileSuffixes();
+        for (String s : suffixes) {
+            Iterator<ImageReader> it = ImageIO.getImageReadersBySuffix(s);
+            if (!it.hasNext()) {
+                throw new RuntimeException("getReaderFileSuffixes returned " +
+                                           "an unknown suffix: " + s);
+            }
+        }
+    }
+
+    private static void testGetWriterFormatNames() {
+        String[] names = ImageIO.getWriterFormatNames();
+        for (String n : names) {
+            Iterator<ImageWriter> it = ImageIO.getImageWritersByFormatName(n);
+            if (!it.hasNext()) {
+                throw new RuntimeException("getWriterFormatNames returned " +
+                                           "an unknown name: " + n);
+            }
+        }
+    }
+
+    private static void testGetWriterMIMETypes() {
+        String[] types = ImageIO.getWriterMIMETypes();
+        for (String t : types) {
+            Iterator<ImageWriter> it = ImageIO.getImageWritersByMIMEType(t);
+            if (!it.hasNext()) {
+                throw new RuntimeException("getWriterMIMETypes returned " +
+                                           "an unknown type: " + t);
+            }
+        }
+    }
+
+    private static void testGetWriterFileSuffixes() {
+        String[] suffixes = ImageIO.getWriterFileSuffixes();
+        for (String s : suffixes) {
+            Iterator<ImageWriter> it = ImageIO.getImageWritersBySuffix(s);
+            if (!it.hasNext()) {
+                throw new RuntimeException("getWriterFileSuffixes returned " +
+                                           "an unknown suffix: " + s);
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+        testGetReaderFormatNames();
+        testGetReaderMIMETypes();
+        testGetReaderFileSuffixes();
+        testGetWriterFormatNames();
+        testGetWriterMIMETypes();
+        testGetWriterFileSuffixes();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/IIOImageConstructor.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4392024
+ * @summary Checks for IllegalArgumentException in IIOImage constructor
+ */
+
+import java.awt.image.BufferedImage;
+
+import javax.imageio.IIOImage;
+
+public class IIOImageConstructor {
+
+    public static void main(String[] args) {
+        BufferedImage image = new BufferedImage(1, 1,
+                                                BufferedImage.TYPE_INT_RGB);
+        try {
+            IIOImage iioi = new IIOImage(image, null, null);
+        } catch (IllegalArgumentException iae) {
+            throw new RuntimeException
+                ("IIOImage constructor taking a RenderedImage fails!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ITSDataType.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4506450
+ * @summary Tests whether ImageTypeSpecifier.createBanded() and
+ *          ImageTypeSpecifier.createInterleaved() can accept all supported
+ *          DataBuffer types
+ */
+
+import java.awt.color.ColorSpace;
+import java.awt.image.DataBuffer;
+
+import javax.imageio.ImageTypeSpecifier;
+
+public class ITSDataType {
+
+    public static final int[] dataTypes = new int[] {
+        DataBuffer.TYPE_BYTE,
+        DataBuffer.TYPE_SHORT,
+        DataBuffer.TYPE_USHORT,
+        DataBuffer.TYPE_INT,
+        DataBuffer.TYPE_FLOAT,
+        DataBuffer.TYPE_DOUBLE,
+    };
+
+    public static void main(String[] args) {
+        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
+        int[] bankIndices = new int[] { 1 };
+        int[] bandOffsets = new int[] { 0 };
+
+        // test createBanded()
+        for (int i = 0; i < dataTypes.length; i++) {
+            int dataType = dataTypes[i];
+
+            try {
+                ImageTypeSpecifier.createBanded(cs, bankIndices, bandOffsets,
+                                                dataType, false, false);
+            } catch (IllegalArgumentException e) {
+                throw new RuntimeException("createBanded() test failed for " +
+                                           "dataType = " + dataType);
+            }
+        }
+
+        // test createInterleaved()
+        for (int i = 0; i < dataTypes.length; i++) {
+            int dataType = dataTypes[i];
+
+            try {
+                ImageTypeSpecifier.createInterleaved(cs, bandOffsets,
+                                                     dataType, false, false);
+            } catch (IllegalArgumentException e) {
+                throw new RuntimeException("createInterleaved() test failed " +
+                                           "for dataType = " + dataType);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageIOGetImageReaders.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4432107
+ * @summary Checks if ImageIO.getImageReaders(null) throws an IAE
+ */
+
+import javax.imageio.ImageIO;
+
+public class ImageIOGetImageReaders {
+
+    public static void main(String[] args) {
+        boolean gotIAE = false;
+        try {
+            ImageIO.getImageReaders(null);
+        } catch (IllegalArgumentException e) {
+            gotIAE = true;
+        }
+
+        if (!gotIAE) {
+            throw new RuntimeException("Failed to get IAE!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageIOWriteFile.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4393174
+ * @summary Checks that ImageIO.write(..., ..., File) truncates the file
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileOutputStream;
+
+import javax.imageio.ImageIO;
+
+public class ImageIOWriteFile {
+
+    public static void main(String[] args) {
+        long length0 = -1L;
+        long length1 = -1L;
+
+        try {
+            BufferedImage bi =
+                new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
+
+            File outFile = File.createTempFile("imageiowritefile", ".tmp");
+
+            // Write image to an empty file
+            outFile.delete();
+            ImageIO.write(bi, "png", outFile);
+            length0 = outFile.length();
+
+            // Write a larger file full of junk
+            outFile.delete();
+            FileOutputStream fos = new FileOutputStream(outFile);
+            for (int i = 0; i < length0*2; i++) {
+                fos.write(1);
+            }
+            fos.close();
+
+            // Write image again
+            ImageIO.write(bi, "png", outFile);
+            length1 = outFile.length();
+
+            outFile.delete();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Unexpected exception!");
+        }
+
+        if (length0 == 0) {
+            throw new RuntimeException("File length is zero!");
+        }
+        if (length1 != length0) {
+            throw new RuntimeException("File length changed!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageIOWriteNull.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4434855
+ * @summary Checks that ImageIO.write(null, null, (File)null) throws an IAE
+ */
+
+import java.io.File;
+
+import javax.imageio.ImageIO;
+
+public class ImageIOWriteNull {
+
+    public static void main(String[] args) {
+        try {
+            ImageIO.write(null, null, (File)null);
+            throw new RuntimeException("Failed to get IAE!");
+        } catch (IllegalArgumentException iae) {
+        } catch (Exception e) {
+            throw new RuntimeException("Unexpected exception: " + e);
+        }
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageReadParamPasses.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4429365
+ * @summary Checks that ImageReadParam.setSourceProgressivePasses handles
+ *          overflow correctly
+ */
+
+import javax.imageio.ImageReadParam;
+
+public class ImageReadParamPasses {
+
+    private static final int maxint = Integer.MAX_VALUE;
+
+    private static void expect(int i, int j) {
+        if (i != j) {
+            throw new RuntimeException("Expected " + i + ", got " + j);
+        }
+    }
+
+    private static void checkForIAE(int minPass, int numPasses) {
+        ImageReadParam param = new ImageReadParam();
+
+        boolean gotIAE = false;
+        try {
+            param.setSourceProgressivePasses(minPass, numPasses);
+        } catch (IllegalArgumentException iae) {
+            gotIAE = true;
+        }
+        if (!gotIAE) {
+            throw new RuntimeException("Failed to get IAE for wraparound!");
+        }
+    }
+
+    private static void test(int minPass, int numPasses) {
+        ImageReadParam param = new ImageReadParam();
+
+        param.setSourceProgressivePasses(minPass, numPasses);
+        expect(param.getSourceMinProgressivePass(), minPass);
+        expect(param.getSourceNumProgressivePasses(), numPasses);
+
+        int maxPass = numPasses == maxint ? maxint : minPass + numPasses - 1;
+        expect(param.getSourceMaxProgressivePass(), maxPass);
+    }
+
+    public static void main(String[] args) {
+        // Typical case
+        test(17, 30);
+
+        // Read all passes
+        test(0, maxint);
+
+        // Start at pass 17, continue indefinitely
+        test(17, maxint);
+
+        // Start at pass maxint - 10, continue indefinitely
+        test(maxint - 10, maxint);
+
+        // Start at pass maxint - 10, go up to maxint - 1
+        test(maxint - 10, 10);
+
+        // Start at pass maxint - 10, go up to maxint
+        test(maxint - 10, 11);
+
+        // Start at maxint, continue indefinitely :-)
+        test(maxint, maxint);
+
+        // Start at maxint, go up to maxint
+        test(maxint, 1);
+
+        // Check that an IllegalArgumentException is thrown if
+        // wraparound occurs
+        checkForIAE(maxint, 2);
+        checkForIAE(maxint - 5, 10);
+        checkForIAE(10, maxint - 5);
+        checkForIAE(maxint - 1000, maxint - 1000);
+        checkForIAE(maxint - 1, maxint - 1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageReaderGetDestination.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4449211
+ * @summary Checks that ImageReader.getDestination throws correct exceptions
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+
+public class ImageReaderGetDestination {
+
+    public static void main(String argv[]) {
+        Vector imageTypes = new Vector();
+        boolean gotIAE1 = false;
+        boolean gotIAE2 = false;
+        boolean gotIAE3 = false;
+        boolean gotIAE4 = false;
+
+        try {
+            DummyImageReaderImpl.getDestination(null, null, 5, 10);
+        } catch (IllegalArgumentException iae) {
+            gotIAE1 = true;
+        } catch (Throwable ee) {
+            System.out.println("Unexpected exception 1:");
+            ee.printStackTrace();
+        }
+        if (!gotIAE1) {
+            throw new RuntimeException("Failed to get IAE #1!");
+        }
+
+        try {
+            DummyImageReaderImpl.getDestination(null, imageTypes.iterator(),
+                                                5, 10);
+        } catch (IllegalArgumentException iae) {
+            gotIAE2 = true;
+        } catch (Throwable ee) {
+            System.out.println("Unexpected exception 2:");
+            ee.printStackTrace();
+        }
+        if (!gotIAE2) {
+            throw new RuntimeException("Failed to get IAE #2!");
+        }
+
+        imageTypes.add("abc");
+        try {
+            DummyImageReaderImpl.getDestination(null, imageTypes.iterator(),
+                                                5, 10);
+        } catch (IllegalArgumentException iae) {
+            gotIAE3 = true;
+        } catch (Throwable ee) {
+            System.out.println("Unexpected exception 3:");
+            ee.printStackTrace();
+        }
+        if (!gotIAE3) {
+            throw new RuntimeException("Failed to get IAE #3!");
+        }
+
+        imageTypes.clear();
+        ImageTypeSpecifier its = ImageTypeSpecifier.createFromBufferedImageType
+            (BufferedImage.TYPE_INT_RGB);
+        imageTypes.add(its);
+        try {
+            DummyImageReaderImpl.getDestination(null,
+                                                imageTypes.iterator(),
+                                                Integer.MAX_VALUE,
+                                                Integer.MAX_VALUE);
+        } catch (IllegalArgumentException iae) {
+            gotIAE4 = true;
+        } catch (Throwable ee) {
+            System.out.println("Unexpected exception 4: ");
+            ee.printStackTrace();
+        }
+        if (!gotIAE4) {
+            throw new RuntimeException("Failed to get IAE #4!");
+        }
+    }
+
+    public static class DummyImageReaderImpl extends ImageReader {
+        public DummyImageReaderImpl(ImageReaderSpi originatingProvider) {
+            super(originatingProvider);
+        }
+        public static BufferedImage getDestination(ImageReadParam param,
+                                                   Iterator imageTypes,
+                                                   int width,
+                                                   int height)
+          throws IIOException {
+            return ImageReader.getDestination(param, imageTypes, width, height);
+        }
+        public int getNumImages(boolean allowSearch) throws IOException {return 1;}
+        public int getWidth(int imageIndex) throws IOException {return 1;}
+        public int getHeight(int imageIndex) throws IOException {return 1;}
+        public Iterator getImageTypes(int imageIndex)
+          throws IOException {return null;}
+        public IIOMetadata getStreamMetadata() throws IOException {return null;}
+        public IIOMetadata getImageMetadata(int imageIndex)
+          throws IOException {return null;}
+        public BufferedImage read(int imageIndex, ImageReadParam param)
+          throws IOException {return null;}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageReaderReadAll.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4450319
+ * @summary Checks that ImageReader.readAll(int, ImageReadParam) makes use of
+ *          the ImageReadParam object
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.MemoryCacheImageInputStream;
+
+public class ImageReaderReadAll {
+
+    private final static byte[] ba = {};
+
+    public static void main(String argv[]) {
+        ImageReader ireader;
+        ImageReadParam irp;
+        IIOImage image;
+        BufferedImage bi;
+        BufferedImage bi_1;
+        BufferedImage bi_2;
+
+        ireader = new DummyImageReaderImpl(null);
+        MemoryCacheImageInputStream mciis = new MemoryCacheImageInputStream
+            (new ByteArrayInputStream(ba));
+        ireader.setInput(mciis);
+
+        irp = new ImageReadParam();
+        irp.setDestination(new BufferedImage(10, 10,
+                                             BufferedImage.TYPE_3BYTE_BGR));
+        try {
+            image = ireader.readAll(0, irp);
+            bi_1 = ireader.read(0, irp);
+            bi_2 = ireader.read(0);
+        } catch (java.io.IOException ee) {
+            throw new RuntimeException("Unexpected exception: " + ee);
+        }
+
+        bi = (BufferedImage)image.getRenderedImage();
+        if (bi.getType() != bi_1.getType()) {
+            throw new RuntimeException("Images have different type!");
+        }
+    }
+
+
+    public static class DummyImageReaderImpl extends ImageReader {
+
+        public DummyImageReaderImpl(ImageReaderSpi originatingProvider) {
+            super(originatingProvider);
+        }
+
+        public BufferedImage read(int imageIndex, ImageReadParam param)
+          throws IOException {
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 1 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+            if (seekForwardOnly) {
+                if (imageIndex < minIndex)
+                    throw new IndexOutOfBoundsException();
+                minIndex = imageIndex;
+            }
+
+            return getDestination(param, getImageTypes(imageIndex), 10, 15);
+        }
+
+        public Iterator getImageTypes(int imageIndex) throws IOException {
+            if (input == null)
+                throw new IllegalStateException();
+            if (imageIndex >= 1 || imageIndex < 0)
+                throw new IndexOutOfBoundsException();
+
+            Vector imageTypes = new Vector();
+            imageTypes.add(ImageTypeSpecifier.createFromBufferedImageType
+                           (BufferedImage.TYPE_BYTE_GRAY ));
+            return imageTypes.iterator();
+        }
+
+        public int getNumImages(boolean allowSearch) throws IOException {return 1;}
+        public int getWidth(int imageIndex) throws IOException {return 1;}
+        public int getHeight(int imageIndex) throws IOException {return 1;}
+        public IIOMetadata getStreamMetadata() throws IOException {return null;}
+        public IIOMetadata getImageMetadata(int imageIndex)
+          throws IOException {return null;}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageStreamFromRAF.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4395378
+ * @summary Checks that ImageIO.createImageInputStream and
+ *          createImageOutputStream produce correct output when given a
+ *          RandomAccessFile
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.FileImageInputStream;
+import javax.imageio.stream.FileImageOutputStream;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class ImageStreamFromRAF {
+
+    public static void main(String[] args) {
+        try {
+            File f = new File("ImageInputStreamFromRAF.tmp");
+            RandomAccessFile raf = new RandomAccessFile(f, "rw");
+            ImageInputStream istream = ImageIO.createImageInputStream(raf);
+            ImageOutputStream ostream = ImageIO.createImageOutputStream(raf);
+            f.delete();
+            if (istream == null) {
+                throw new RuntimeException("ImageIO.createImageInputStream(RandomAccessFile) returned null!");
+            }
+            if (ostream == null) {
+                throw new RuntimeException("ImageIO.createImageOutputStream(RandomAccessFile) returned null!");
+            }
+            if (!(istream instanceof FileImageInputStream)) {
+                throw new RuntimeException("ImageIO.createImageInputStream(RandomAccessFile) did not return a FileImageInputStream!");
+            }
+            if (!(ostream instanceof FileImageOutputStream)) {
+                throw new RuntimeException("ImageIO.createImageOutputStream(RandomAccessFile) did not return a FileImageOutputStream!");
+            }
+        } catch (IOException ioe) {
+            throw new RuntimeException("Unexpected IOException: " + ioe);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageTypeSpecifierBitsPerBand.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4392669
+ * @summary Checks contract of ImageTypeSpecifier.getBitsPerBand
+ */
+
+import java.awt.image.BufferedImage;
+
+import javax.imageio.ImageTypeSpecifier;
+
+public class ImageTypeSpecifierBitsPerBand {
+
+    public static void main(String[] args) {
+        int biType = BufferedImage.TYPE_USHORT_565_RGB;
+        ImageTypeSpecifier type =
+            ImageTypeSpecifier.createFromBufferedImageType(biType);
+
+        int b0 = type.getBitsPerBand(0);
+        int b1 = type.getBitsPerBand(1);
+        int b2 = type.getBitsPerBand(2);
+
+        if (b0 != 5 || b1 != 6 || b2 != 5) {
+            throw new RuntimeException("Got incorrect bits per band value!");
+        }
+
+        boolean gotIAE = false;
+        try {
+            int b3 = type.getBitsPerBand(3);
+        } catch (IllegalArgumentException e) {
+            gotIAE = true;
+        }
+        if (!gotIAE) {
+            throw new RuntimeException
+                ("Failed to get IllegalArgumentException for band == 3!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageTypeSpecifierTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,310 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4429934 4429950 4430991 4430993
+ * @summary Checks various aspects of ImageTypeSpecifier functionality
+ */
+
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.SampleModel;
+
+import javax.imageio.ImageTypeSpecifier;
+
+public class ImageTypeSpecifierTest {
+
+    private static void fail(String message) {
+        throw new RuntimeException(message);
+    }
+
+    private static void test4429934() {
+        try {
+            ImageTypeSpecifier itspecifier =
+                new ImageTypeSpecifier(null, null);
+            fail("Failed to get IAE!");
+        } catch( IllegalArgumentException e ) {
+        }
+
+        try {
+            ImageTypeSpecifier itspecifier = new ImageTypeSpecifier(null);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e ) {
+        }
+    }
+
+    private static void test4429950() {
+        createPackedTest();
+        createInterleavedTest();
+        createBandedTest();
+        createIndexedTest();
+    }
+
+    public static void createPackedTest() {
+        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+        int rmask = 0x00ff0000;
+        int gmask = 0x0000ff00;
+        int bmask = 0x000000ff;
+        int amask = 0xff000000;
+        try {
+            ImageTypeSpecifier.createPacked(null, rmask, gmask, bmask, amask, 0,
+false);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        ColorSpace cs1 = ColorSpace.getInstance(ColorSpace.CS_GRAY);
+        try {
+            ImageTypeSpecifier.createPacked
+                (cs1, rmask, gmask, bmask, amask, 0, false);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createPacked(cs, 0, 0, 0, 0, 0, false);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createPacked(cs, rmask, gmask, bmask, amask, -1,
+false);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public static void createInterleavedTest() {
+        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+        int[] bandOffsets = {0,0,0,0};
+        int dataType = 0;
+        boolean hasAlpha = true;
+        boolean isAlphaPremultiplied = true;
+
+        try {
+            ImageTypeSpecifier.createInterleaved
+                (null, bandOffsets, dataType, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createInterleaved
+                (cs, null, dataType, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        int[] bad_bandOffsets = {0,100,1000};
+        try {
+            ImageTypeSpecifier.createInterleaved
+                (cs, bad_bandOffsets, dataType, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        int[] bad_bandOffsets_1 = {};
+        try {
+            ImageTypeSpecifier.createInterleaved
+                (cs, bad_bandOffsets_1, dataType, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public static void createBandedTest() {
+        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+        int[] bankIndices = {0, 100, 1000, 10000};
+        int[] bandOffsets = {0, 100, 1000, 10000};
+        int dataType = 0;
+        boolean hasAlpha = true;
+        boolean isAlphaPremultiplied = true;
+
+        try {
+            ImageTypeSpecifier.createBanded(null, bankIndices, bandOffsets,
+                dataType, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        int[] bad_bankIndices = {};
+        int[] bad_bandOffsets = {};
+        try {
+            ImageTypeSpecifier.createBanded(cs, bad_bankIndices, bad_bandOffsets,
+                dataType, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createBanded(cs, bankIndices, bandOffsets,
+                99999, hasAlpha, isAlphaPremultiplied);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public static void createGrayscaleTest() {
+        int bits = 8;
+        int dataType = DataBuffer.TYPE_BYTE;
+        boolean isSigned = true;
+        // testcase 1
+        try {
+            ImageTypeSpecifier.createGrayscale(100, dataType, isSigned);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createGrayscale(10, dataType, isSigned);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createGrayscale(bits, 100, isSigned);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+   }
+
+   public static void createIndexedTest() {
+        byte[] redLUT = {0};
+        byte[] greenLUT = {0};
+        byte[] blueLUT = {0};
+        byte[] alphaLUT = {0};
+        int bits = 8;
+        int dataType = DataBuffer.TYPE_BYTE;
+
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+                blueLUT, alphaLUT, 0, dataType);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+                blueLUT, alphaLUT, 17, dataType);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+                blueLUT, alphaLUT, 10, dataType);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        byte[] greenLUT_4 = {};
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT, greenLUT_4,
+                blueLUT, alphaLUT, bits, dataType);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        byte[] redLUT_5 = {};
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT_5, greenLUT,
+                blueLUT, alphaLUT, bits, dataType);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        byte[] alphaLUT_6 = {};
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+                blueLUT, alphaLUT_6 , bits, dataType);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            ImageTypeSpecifier.createIndexed(redLUT, greenLUT,
+                blueLUT, alphaLUT , bits, 100);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    private static void test4430991() {
+        ImageTypeSpecifier itspecifier;
+
+        itspecifier = ImageTypeSpecifier.createFromBufferedImageType
+            (BufferedImage.TYPE_INT_RGB);
+
+        try {
+            itspecifier.createBufferedImage(Integer.MAX_VALUE,
+                                            Integer.MAX_VALUE);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+
+        try {
+            itspecifier.getSampleModel(Integer.MAX_VALUE, Integer.MAX_VALUE);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    private static void test4430993() {
+        ImageTypeSpecifier itspecifier;
+
+        int bits = 32;
+        int rmask = 0x00ff0000;
+        int gmask = 0x0000ff00;
+        int bmask = 0x000000ff;
+        ColorModel dcm = new java.awt.image.DirectColorModel
+            (bits, rmask, gmask, bmask);
+        int[] bandOffsets = new int[2];
+        bandOffsets[1] = 1;
+        SampleModel sm = new java.awt.image.ComponentSampleModel
+            (DataBuffer.TYPE_SHORT, 1, 1, 2, 2, bandOffsets);
+
+        try {
+            itspecifier = new ImageTypeSpecifier(dcm, sm);
+            fail("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public static void main(String[] args) {
+        try {
+            test4429934();
+            test4429950();
+            test4430991();
+            test4430993();
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            e.printStackTrace();
+            System.out.println("Unexpected exception: " + e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ImageWriteParamMisc.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4434870 4434886 4441315 4446842
+ * @summary Checks that miscellaneous ImageWriteParam methods work properly
+ */
+
+import java.awt.Dimension;
+
+import javax.imageio.ImageWriteParam;
+
+public class ImageWriteParamMisc {
+
+    public static void main(String[] args) {
+        test4434870();
+        test4434886();
+        test4441315();
+        test4446842();
+    }
+
+    public static class ImageWriteParam4434870 extends ImageWriteParam {
+        public ImageWriteParam4434870() {
+            super(null);
+            super.canWriteTiles = true;
+            super.preferredTileSizes =
+                new Dimension[] {new Dimension(1, 2), new Dimension(5, 6)};
+        }
+    }
+
+    private static void test4434870() {
+        ImageWriteParam iwp = new ImageWriteParam4434870();
+        try {
+            Dimension[] dimensions = iwp.getPreferredTileSizes();
+            iwp.setTilingMode(ImageWriteParam.MODE_EXPLICIT);
+            iwp.setTiling(100, 100, 0,0);
+            throw new RuntimeException("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public static class ImageWriteParam4434886 extends ImageWriteParam {
+        public ImageWriteParam4434886() {
+            super(null);
+            super.canWriteTiles = true;
+            super.canOffsetTiles = true;
+        }
+    }
+
+    private static void test4434886() {
+        ImageWriteParam iwp = new ImageWriteParam4434886();
+        iwp.setTilingMode(ImageWriteParam.MODE_EXPLICIT);
+        try {
+            iwp.setTiling(-1,-2,-3,-4);
+            throw new RuntimeException("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public static class ImageWriteParam4441315 extends ImageWriteParam {
+        public ImageWriteParam4441315() {
+            super(null);
+            super.canWriteProgressive = true;
+        }
+    }
+
+    private static void test4441315() {
+        ImageWriteParam iwp = new ImageWriteParam4441315();
+        try {
+            iwp.setProgressiveMode(ImageWriteParam.MODE_EXPLICIT);
+            throw new RuntimeException("Failed to get IAE!");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    private static void test4446842() {
+        ImageWriteParam iwp = new ImageWriteParam(null);
+        try {
+            iwp.getCompressionTypes();
+            throw new RuntimeException("Failed to get UOE!");
+        } catch (UnsupportedOperationException e) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/NullInputOutput.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4892682 4892698
+ * @summary Tests that the appropriate IllegalStateException is thrown if
+ *          ImageReader.read() or ImageWriter.write() is called without having
+ *          first set the input/output stream
+ */
+
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ImageWriterSpi;
+
+public class NullInputOutput {
+
+    public static void main(String[] args) throws Exception {
+        IIORegistry registry = IIORegistry.getDefaultInstance();
+
+        // test ImageReader.read() for all available ImageReaders
+        Iterator readerspis = registry.getServiceProviders(ImageReaderSpi.class,
+                                                           false);
+        while (readerspis.hasNext()) {
+            ImageReaderSpi readerspi = (ImageReaderSpi)readerspis.next();
+            ImageReader reader = readerspi.createReaderInstance();
+            try {
+                reader.read(0);
+            } catch (IllegalStateException ise) {
+                // caught exception, everything's okay
+            }
+        }
+
+        // test ImageWriter.write() for all available ImageWriters
+        BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
+        Iterator writerspis = registry.getServiceProviders(ImageWriterSpi.class,
+                                                           false);
+        while (writerspis.hasNext()) {
+            ImageWriterSpi writerspi = (ImageWriterSpi)writerspis.next();
+            ImageWriter writer = writerspi.createWriterInstance();
+            try {
+                writer.write(bi);
+            } catch (IllegalStateException ise) {
+                // caught exception, everything's okay
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/PNGSpiStreamMetadata.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4403355
+ * @summary Checks that PNGImage{Reader,Writer}Spi.getStreamMetadataFormatNames
+ *          and getNativeStreamMetadataFormatName return null
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ImageWriterSpi;
+
+import com.sun.imageio.plugins.png.PNGImageReaderSpi;
+import com.sun.imageio.plugins.png.PNGImageWriterSpi;
+
+public class PNGSpiStreamMetadata {
+
+    private static void fatal() {
+        throw new RuntimeException("Got a non-null stream metadata format!");
+    }
+
+    public static void main(String[] args) {
+        ImageReaderSpi rspi = new PNGImageReaderSpi();
+        if (rspi.getNativeStreamMetadataFormatName() != null) {
+            fatal();
+        }
+        if (rspi.isStandardStreamMetadataFormatSupported() != false) {
+            fatal();
+        }
+        if (rspi.getExtraStreamMetadataFormatNames() != null) {
+            fatal();
+        }
+
+        ImageWriterSpi wspi = new PNGImageWriterSpi();
+        if (wspi.getNativeStreamMetadataFormatName() != null) {
+            fatal();
+        }
+        if (wspi.isStandardStreamMetadataFormatSupported() != false) {
+            fatal();
+        }
+        if (wspi.getExtraStreamMetadataFormatNames() != null) {
+            fatal();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/PNGSuffixes.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4394924
+ * @summary Checks for spurious leading "." in PNG file suffixes
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import com.sun.imageio.plugins.png.PNGImageWriterSpi;
+
+public class PNGSuffixes {
+
+    public static void main(String[] args) {
+        String[] suffixes = new PNGImageWriterSpi().getFileSuffixes();
+        for (int i = 0; i < suffixes.length; i++) {
+            if (suffixes[i].startsWith(".")) {
+                throw new RuntimeException("Found a \".\" in a suffix!");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/ReadBitsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4416800
+ * @summary Checks that ImageInputStreamImpl.readBit and readBits handle the bit
+ *          offset correctly
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.imageio.stream.FileCacheImageInputStream;
+import javax.imageio.stream.ImageInputStream;
+
+public class ReadBitsTest {
+    public static void main(String[] args) throws IOException {
+        byte[] buffer = new byte[] {(byte)169, (byte)85}; // 10101001 01010101
+        InputStream ins = new ByteArrayInputStream(buffer);
+        ImageInputStream in = new FileCacheImageInputStream(ins,null);
+
+        if (in.getBitOffset() != 0) {
+            throw new RuntimeException("Initial bit offset != 0!");
+        }
+
+        int bit0 = in.readBit(); // 1
+        if (bit0 != 1) {
+            throw new RuntimeException("First bit != 1");
+        }
+        if (in.getBitOffset() != 1) {
+            throw new RuntimeException("Second bit offset != 1");
+        }
+
+        long bits1 = in.readBits(5); // 01010 = 10
+        if (bits1 != 10) {
+            throw new RuntimeException("Bits 1-5 != 10 (= " + bits1 + ")");
+        }
+        if (in.getBitOffset() != 6) {
+            throw new RuntimeException("Third bit offset != 6");
+        }
+
+        int bit1 = in.readBit(); // 0
+        if (bit1 != 0) {
+            throw new RuntimeException("Bit 6 != 0");
+        }
+        if (in.getBitOffset() != 7) {
+            throw new RuntimeException("Third bit offset != 7");
+        }
+
+        long bits2 = in.readBits(8); // 10101010 = 170
+        if (bits2 != 170) {
+            throw new RuntimeException("Bits 7-14 != 170 (= " + bits2 + ")");
+        }
+        if (in.getBitOffset() != 7) {
+            throw new RuntimeException("Fourth bit offset != 7");
+        }
+
+        int bit2 = in.readBit(); // 1
+        if (bit2 != 1) {
+            throw new RuntimeException("Bit 15 != 1");
+        }
+        if (in.getBitOffset() != 0) {
+            throw new RuntimeException("Fifth bit offset != 0");
+        }
+
+        in.close();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/SetOutput.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4414455
+ * @summary Checks for NPE from ImageWriter.setOutput when the writer has no
+ *          originating service provider
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.imageio.plugins.png.PNGImageWriter;
+
+public class SetOutput {
+
+    public static void main(String[] args) throws IOException {
+        ImageWriter iw = new PNGImageWriter(null);
+        File f = File.createTempFile("imageio", "tmp");
+        ImageOutputStream ios = ImageIO.createImageOutputStream(f);
+        try {
+            iw.setOutput(ios);
+        } catch (NullPointerException npe) {
+            f.delete();
+            throw new RuntimeException("Got NullPointerException!");
+        }
+        f.delete();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/WriteNullImageTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4954545
+ * @summary This test verifies whether the ImageWriter implementations throw
+ *          IllegalArgumentException when a null image is passed to the write
+ *          method. This is tested for all the image writers available with the
+ *          IIORegistry.
+ */
+
+import java.io.FileOutputStream;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageWriterSpi;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteNullImageTest {
+
+    public WriteNullImageTest() {
+        boolean testFailed = false;
+        String failMsg = "FAIL: IllegalArgumentException is not thrown by the " +
+            "ImageWriter when the image passed to the write() method is " +
+            "null, for the image formats: ";
+
+        try {
+            IIORegistry reg = IIORegistry.getDefaultInstance();
+            ImageWriter writer = null;
+            Iterator writerSpiIter = reg.getServiceProviders(ImageWriterSpi.class, true);
+
+            while (writerSpiIter.hasNext()) {
+                ImageWriterSpi writerSpi = (ImageWriterSpi) writerSpiIter.next();
+                writer = writerSpi.createWriterInstance();
+                String names[] = writerSpi.getFormatNames();
+
+                FileOutputStream fos = new FileOutputStream("temp");
+                ImageOutputStream ios = ImageIO.createImageOutputStream(fos);
+                writer.setOutput(ios);
+
+                try {
+                    writer.write(null, null, null);
+                } catch (IllegalArgumentException iae) {
+                    System.out.println("PASS: Expected exception is thrown when null img is passed " +
+                                       "to the write method, for the image format: " + names[0]);
+                    System.out.println("\n");
+                } catch (Exception e) {
+                    testFailed = true;
+                    failMsg = failMsg + names[0] + ", ";
+                }
+            }
+
+        } catch (Exception e) {
+            testFailed = true;
+            throw new RuntimeException("Test Failed. Exception thrown: " + e.toString());
+        }
+        if (testFailed) {
+            failMsg = failMsg.substring(0, failMsg.lastIndexOf(","));
+            throw new RuntimeException(failMsg);
+        }
+    }
+
+    public static void main(String args[]) {
+        WriteNullImageTest test = new WriteNullImageTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/event/WriteProgressListenerTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4420342 4421831
+ * @summary Checks that IIOWriteProgressListener methods are called in proper
+ *          sequence for the JPEG and PNG writers
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOWriteProgressListener;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteProgressListenerTest implements IIOWriteProgressListener {
+
+    final static int UNINITIALIZED = 0;
+    final static int IMAGE_STARTED = 1;
+    final static int IMAGE_COMPLETE = 2;
+
+    int state = UNINITIALIZED;
+    float prevPercentageDone = 0.0F;
+    File tempFile = null;
+
+    public WriteProgressListenerTest(String format) throws IOException {
+        ImageWriter writer = null;
+        Iterator witer = ImageIO.getImageWritersByFormatName(format);
+        if (!witer.hasNext()) {
+            error("No writer for format " + format + "!");
+        }
+        writer = (ImageWriter)witer.next();
+
+        System.out.println("Got writer " + writer);
+        writer.addIIOWriteProgressListener(this);
+
+        this.tempFile = File.createTempFile("imageio", ".tmp");
+        tempFile.deleteOnExit();
+        ImageOutputStream stream = ImageIO.createImageOutputStream(tempFile);
+        writer.setOutput(stream);
+
+        BufferedImage im =
+            new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR);
+
+        this.state = UNINITIALIZED;
+
+        writer.write(im);
+
+        if (this.state == UNINITIALIZED) {
+            error("imageStarted never called!");
+        }
+        if (this.state != IMAGE_COMPLETE) {
+            error("imageComplete not called!");
+        }
+
+        print("Passed!");
+    }
+
+    private void error(String s) {
+        if (tempFile != null) {
+            tempFile.delete();
+        }
+        throw new RuntimeException(s);
+    }
+
+    private void print(String s) {
+        System.out.println(s);
+    }
+
+    public void sequenceStarted(ImageWriter source) {
+        error("Obsolete method sequenceStarted was called!");
+    }
+
+    public void sequenceComplete(ImageWriter source) {
+        error("Obsolete method sequenceComplete was called!");
+    }
+
+    public void imageStarted(ImageWriter source, int imageIndex) {
+        print("imageStarted: imageIndex = " + imageIndex);
+
+        if (state != UNINITIALIZED) {
+            error("imageStarted not called first!");
+        }
+        state = IMAGE_STARTED;
+        prevPercentageDone = 0.0F;
+    }
+
+    public void imageProgress(ImageWriter source,
+                              float percentageDone) {
+        print("imageProgress: percentageDone = " + percentageDone);
+
+        if (state != IMAGE_STARTED) {
+            error("imageProgress called without prior imageStarted!");
+        }
+        if (percentageDone < prevPercentageDone) {
+            error("percentageDone did not increase!");
+        }
+        prevPercentageDone = percentageDone;
+    }
+
+    public void imageComplete(ImageWriter source) {
+        print("imageComplete");
+
+        if (state != IMAGE_STARTED) {
+            error("imageComplete called without imageStarted!");
+        }
+        if (prevPercentageDone == 0.0F) {
+            error("percentageDone was never updated!");
+        }
+        state = IMAGE_COMPLETE;
+    }
+
+    public void thumbnailStarted(ImageWriter source,
+                                 int imageIndex, int thumbnailIndex) {
+    }
+
+    public void thumbnailProgress(ImageWriter source, float percentageDone) {
+    }
+
+    public void thumbnailComplete(ImageWriter source) {
+    }
+
+    public void writeAborted(ImageWriter source) {
+    }
+
+    public static void main(String[] args) throws IOException {
+        new WriteProgressListenerTest("jpeg");
+        new WriteProgressListenerTest("png");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BMPCompressionTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4641872
+ * @summary Tests writing compression modes of BMP plugin
+ * @modules java.desktop/com.sun.imageio.plugins.bmp
+ */
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.DirectColorModel;
+import java.awt.image.IndexColorModel;
+import java.awt.image.PixelInterleavedSampleModel;
+import java.awt.image.Raster;
+import java.awt.image.SampleModel;
+import java.awt.image.SinglePixelPackedSampleModel;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.plugins.bmp.BMPImageWriteParam;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+
+import com.sun.imageio.plugins.bmp.BMPMetadata;
+
+public class BMPCompressionTest {
+
+    static final String format = "BMP";
+
+    public static void main(String[] args) {
+
+        ImageWriter iw = null;
+        Iterator writers = ImageIO.getImageWritersByFormatName(format);
+        if (!writers.hasNext()) {
+            throw new RuntimeException("No available Image writer for "+format);
+        }
+        iw = (ImageWriter)writers.next();
+
+
+        Iterator tests = Test.createTestSet(iw);
+
+        while(tests.hasNext()) {
+
+            Test t = (Test)tests.next();
+            System.out.println(t.getDescription());
+            t.doTest();
+        }
+
+    }
+
+
+    static class Test {
+        static ImageWriter iw;
+        private BufferedImage img;
+        private String description;
+        private BMPImageWriteParam param;
+        private IIOMetadata meta;
+
+
+        public static Iterator createTestSet(ImageWriter w) {
+            List l = new LinkedList();
+
+            Test.iw = w;
+
+            // variate compression types
+            BMPImageWriteParam param = (BMPImageWriteParam)iw.getDefaultWriteParam();
+            param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+            param.setCompressionType("BI_RGB");
+            if (param.canWriteCompressed()) {
+                String[] cTypes = param.getCompressionTypes();
+                String[] cDescr = param.getCompressionQualityDescriptions();
+                float[] cValues = param.getCompressionQualityValues();
+
+                if (cDescr == null) {
+                    System.out.println("There are no compression quality description!");
+                } else {
+                    for(int i=0; i<cDescr.length; i++) {
+                        System.out.println("Quality[" + i + "]=\""+cDescr[i]+"\"");
+                    }
+                }
+                if (cValues == null) {
+                    System.out.println("There are no compression quality values!");
+                } else {
+                    for(int i=0; i<cValues.length; i++) {
+                        System.out.println("Value["+i+"]=\""+cValues[i]+"\"");
+                    }
+                }
+
+                for(int i=0; i<cTypes.length; i++) {
+                    String compressionType = cTypes[i];
+                    BufferedImage img = null;
+
+                    int type = BufferedImage.TYPE_INT_BGR;
+                    try {
+                        img = createTestImage(type);
+                        if (compressionType.equals("BI_RLE8")) {
+                            img = createTestImage2(8, DataBuffer.TYPE_BYTE);
+                        } else if (compressionType.equals("BI_RLE4")) {
+                            img = createTestImage3(4, DataBuffer.TYPE_BYTE);
+                        } else if (compressionType.equals("BI_BITFIELDS")) {
+                            img = createTestImage4(32);
+                        }
+
+                    } catch (IOException ex) {
+                        throw new RuntimeException("Unable to create test image");
+                    }
+                    BMPImageWriteParam p = (BMPImageWriteParam)iw.getDefaultWriteParam();
+                    System.out.println("Current compression type is \""+cTypes[i]+"\"");
+                    p.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+                    p.setCompressionType(compressionType);
+
+                    IIOMetadata md = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), p);
+
+                    l.add( new Test(p, md, img));
+                }
+            }
+            //     }
+            return l.iterator();
+
+        }
+
+        private Test(BMPImageWriteParam p, IIOMetadata md, BufferedImage i) {
+            param = p;
+            meta = md;
+            img = i;
+
+
+            description = "Compression type is " + p.getCompressionType();
+        }
+
+        public String getDescription() {
+            return description;
+        }
+
+        public void doTest() {
+            try {
+                System.out.println(this.getDescription());
+                if (param.getCompressionMode() != ImageWriteParam.MODE_EXPLICIT) {
+                    System.out.println("Warning: compression mode is not MODE_EXPLICIT");
+                }
+                // change metadata according to ImageWriteParam
+                IIOMetadata new_meta = iw.convertImageMetadata(meta, new ImageTypeSpecifier(img), param);
+
+                IIOImage iio_img = new IIOImage(img, null, new_meta);
+
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+                iw.setOutput(ios);
+                System.out.print("write image...");
+                System.out.println("Current compression Type is \""+param.getCompressionType()+"\"");
+                iw.write(new_meta, iio_img, param);
+                //iw.write(iio_img);
+                System.out.println("OK");
+                System.out.print("read image ... ");
+                ios.flush();
+
+                byte[] ba_image = baos.toByteArray();
+
+                System.out.println("Array length=" + ba_image.length);
+                FileOutputStream fos = new FileOutputStream(new File(param.getCompressionType()+".bmp"));
+                fos.write(ba_image);
+                fos.flush();
+                fos = null;
+                ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+                ImageReader ir = ImageIO.getImageReader(iw);
+                ir.setInput(ImageIO.createImageInputStream(bais));
+
+                BufferedImage res = ir.read(0);
+                System.out.println("OK");
+
+                if (!param.getCompressionType().equals("BI_JPEG")) {
+                    System.out.print("compare images ... ");
+                    boolean r = compare(img,res);
+                    System.out.println(r?"OK":"FAILED");
+                    if (!r) {
+                        throw new RuntimeException("Compared images are not equals. Test failed.");
+                    }
+                }
+
+
+                BMPMetadata mdata = (BMPMetadata)ir.getImageMetadata(0);
+
+                if (!param.getCompressionType().equals(param.getCompressionTypes()[mdata.compression])) {
+                    throw new RuntimeException("Different compression value");
+                }
+
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                throw new RuntimeException("Unexpected exception: " + ex);
+            }
+
+        }
+
+        private boolean compare(final BufferedImage in, final BufferedImage out) {
+
+            final int width = in.getWidth();
+            int height = in.getHeight();
+            if (out.getWidth() != width || out.getHeight() != height) {
+                throw new RuntimeException("Dimensions changed!");
+            }
+
+            Raster oldras = in.getRaster();
+            ColorModel oldcm = in.getColorModel();
+            Raster newras = out.getRaster();
+            ColorModel newcm = out.getColorModel();
+
+            for (int j = 0; j < height; j++) {
+                for (int i = 0; i < width; i++) {
+                    Object oldpixel = oldras.getDataElements(i, j, null);
+                    int oldrgb = oldcm.getRGB(oldpixel);
+                    int oldalpha = oldcm.getAlpha(oldpixel);
+
+                    Object newpixel = newras.getDataElements(i, j, null);
+                    int newrgb = newcm.getRGB(newpixel);
+                    int newalpha = newcm.getAlpha(newpixel);
+
+                    if (newrgb != oldrgb ||
+                        newalpha != oldalpha) {
+                        // showDiff(in, out);
+                        throw new RuntimeException("Pixels differ at " + i +
+                                                   ", " + j + " new = " + Integer.toHexString(newrgb) + " old = " + Integer.toHexString(oldrgb));
+                    }
+                }
+            }
+            return true;
+        }
+
+        private static BufferedImage createTestImage2(int nbits, int transfertype) {
+            final int colorShift = 2;
+            int SIZE = 256;
+            BufferedImage image = null;
+
+            ColorSpace colorSpace =
+                ColorSpace.getInstance(ColorSpace.CS_GRAY);
+            ColorModel colorModel =
+                new ComponentColorModel(colorSpace,
+                                        new int[] {nbits},
+                                        false,
+                                        false,
+                                        Transparency.OPAQUE,
+                                        transfertype);
+
+            SampleModel sampleModel =
+                new PixelInterleavedSampleModel(transfertype,
+                                                SIZE,
+                                                SIZE,
+                                                1,
+                                                SIZE,
+                                                new int[] {0});
+
+            image =
+                new BufferedImage(colorModel,
+                                  Raster.createWritableRaster(sampleModel, null),
+                                  false, null);
+            WritableRaster raster = image.getWritableTile(0, 0);
+            int[] samples = raster.getSamples(0, 0, SIZE, SIZE, 0, (int[])null);
+            int off = 0;
+            int[] row = new int[SIZE];
+            for(int i = 0; i < SIZE; i++) {
+                Arrays.fill(row, i << colorShift);
+                System.arraycopy(row, 0, samples, off, SIZE);
+                off += SIZE;
+            }
+            raster.setSamples(0, 0, SIZE, SIZE, 0, samples);
+
+            return image;
+        }
+
+
+        private static BufferedImage createTestImage3(int nbits, int transfertype) {
+            final int colorShift = 2;
+            int SIZE = 256;
+            BufferedImage image = null;
+
+            ColorSpace colorSpace =
+                ColorSpace.getInstance(ColorSpace.CS_sRGB);
+            ColorModel colorModel =
+                new IndexColorModel(nbits,
+                                    4,
+                                    new byte[] { (byte)255,   0,   0, (byte)255},
+                                    new byte[] {   0, (byte)255,   0, (byte)255},
+                                    new byte[] {   0,   0, (byte)255, (byte)255});
+
+            SampleModel sampleModel =
+                new PixelInterleavedSampleModel(transfertype,
+                                                SIZE,
+                                                SIZE,
+                                                1,
+                                                SIZE,
+                                                new int[] {0});
+
+            image =
+                new BufferedImage(colorModel,
+                                  Raster.createWritableRaster(sampleModel, null),
+
+                                  false, null);
+
+            Graphics2D g = image.createGraphics();
+            g.setColor(Color.white);
+            g.fillRect(0,0, SIZE, SIZE);
+            g.setColor(Color.red);
+            g.fillOval(10, 10, SIZE -20, SIZE-20);
+
+            return image;
+        }
+
+        private static BufferedImage createTestImage4(int nbits) {
+            int SIZE = 10;
+
+
+            BufferedImage image = null;
+
+            ColorSpace colorSpace =
+                ColorSpace.getInstance(ColorSpace.CS_sRGB);
+            ColorModel colorModel =
+                new DirectColorModel(colorSpace,
+                                     nbits, 0xff0000, 0x00ff00, 0x0000ff, 0x000000, false, DataBuffer.TYPE_INT);
+
+            SampleModel sampleModel =
+                new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT,
+                                                SIZE,
+                                                SIZE,
+                                      new int[] { 0xff0000, 0x00ff00, 0x0000ff} );
+
+
+            image =
+                new BufferedImage(colorModel,
+                                  Raster.createWritableRaster(sampleModel, null),
+
+                                  false, null);
+
+            Graphics2D g = image.createGraphics();
+            g.setColor(Color.red);
+            g.fillRect(0,0, SIZE, SIZE);
+            g.setColor(Color.green);
+            //g.fillOval(10, 10, SIZE -20, SIZE-20);
+            g.drawLine(7, 0, 7, SIZE);
+            g.setColor(Color.blue);
+            g.drawLine(1, 0, 1, SIZE);
+            g.setColor(Color.white);
+            g.drawLine(3, 0, 3, SIZE);
+            g.setColor(Color.yellow);
+            g.drawLine(5, 0, 5, SIZE);
+            return image;
+        }
+
+        private static BufferedImage createTestImage(int type)
+          throws IOException {
+
+            int w = 200;
+            int h = 200;
+            BufferedImage b = new BufferedImage(w, h, type);
+            Graphics2D g = b.createGraphics();
+            g.setColor(Color.white);
+            g.fillRect(0,0, w, h);
+            g.setColor(Color.black);
+            g.fillOval(10, 10, w -20, h-20);
+
+            return b;
+        }
+
+
+    }
+
+    private static void showDiff(final BufferedImage in,
+                                 final BufferedImage out) {
+        final int width = in.getWidth();
+        final int height = in.getHeight();
+
+        JFrame f = new JFrame("");
+        f.getContentPane().add( new JComponent() {
+                public Dimension getPreferredSize() {
+                    return new Dimension(2*width+2, height);
+                }
+                public void paintComponent(Graphics g) {
+                    g.setColor(Color.black);
+                    g.drawImage(in, 0,0, null);
+
+                    g.drawImage(out, width+2, 0, null);
+                }
+            });
+        f.pack();
+        f.setVisible(true);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BMPPluginTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4641872 4892194
+ * @summary Tests writing and reading abilities of BMP plugin
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.IIOException;
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageWriterSpi;
+
+public class BMPPluginTest {
+
+    private static final int[] types = {
+        BufferedImage.TYPE_INT_RGB, // = 1;
+        BufferedImage.TYPE_INT_ARGB, // = 2;
+        BufferedImage.TYPE_INT_ARGB_PRE, // = 3;
+        BufferedImage.TYPE_INT_BGR, // = 4;
+        BufferedImage.TYPE_3BYTE_BGR, // = 5;
+        BufferedImage.TYPE_4BYTE_ABGR, // = 6;
+        BufferedImage.TYPE_4BYTE_ABGR_PRE, // 7
+        BufferedImage.TYPE_USHORT_565_RGB, // 8
+        BufferedImage.TYPE_USHORT_555_RGB, // 9
+        BufferedImage.TYPE_BYTE_GRAY, // 10
+        BufferedImage.TYPE_USHORT_GRAY, //11
+        BufferedImage.TYPE_BYTE_BINARY, //12
+        BufferedImage.TYPE_BYTE_INDEXED //13
+    };
+
+    private static String format = "BMP";
+
+    private static ImageReader ir = null;
+    private static ImageWriter iw = null;
+    private BufferedImage img;
+    private ImageWriteParam param;
+    private ByteArrayOutputStream baos;
+
+    private static void init() {
+
+        Iterator i = ImageIO.getImageWritersByFormatName(format);
+        if (!i.hasNext()) {
+            throw new RuntimeException("No available ImageWrites for "+format+" format!");
+        }
+        iw = (ImageWriter)i.next();
+
+        i = ImageIO.getImageReadersByFormatName(format);
+        if (!i.hasNext()) {
+            throw new RuntimeException("No available ImageReaders for " +format+" format!");
+        }
+
+        ir = (ImageReader)i.next();
+    }
+
+    public static void main(String[] args) {
+        if (args.length > 0) {
+            format = args[0];
+            System.out.println("Test format " + format);
+        }
+
+        init();
+        System.out.println("IR="+ir);
+        System.out.println("IW="+iw);
+        ImageIO.setUseCache(false);
+
+        for (int i=0; i<types.length; i++) {
+            boolean bPassed = true;
+            Object reason = null;
+
+            try {
+
+                BufferedImage image = createTestImage(types[i]);
+
+                ImageWriteParam param = iw.getDefaultWriteParam();
+
+                BMPPluginTest t = new BMPPluginTest(image, param);
+                boolean res = false;
+                res = t.test();
+                if (!res) {
+                    bPassed = false;
+                    reason = new String("Null result");
+                }
+            } catch (IllegalArgumentException ex) {
+                System.out.println("Expected exception type was caught: " + ex);
+
+            } catch (Throwable ex ) {
+                System.out.println("FAILED");
+                ex.printStackTrace();
+                bPassed = false;
+                reason = ex;
+                throw new RuntimeException("Test for type " + types[i] + " FAILED due to exception");
+            }
+/*
+            System.out.println("Type " + types[i] + " result: " +
+                               (bPassed ? "PASSED" : "FAILED") +
+                               ((reason != null) ? (" Reason: " + reason) : ""));
+*/
+            System.out.println("Test for type " + types[i] + " PASSED");
+        }
+
+        System.out.println("END OF TEST");
+    }
+
+    public BMPPluginTest(BufferedImage img, ImageWriteParam param) {
+
+        this.img = img;
+        this.param = param;
+        baos = new ByteArrayOutputStream();
+    }
+
+    public boolean test() throws IIOException, IOException {
+
+        ir.reset();
+        iw.reset();
+
+        String[] suffixes = iw.getOriginatingProvider().getFileSuffixes();
+
+        IIOMetadata md = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param);
+
+        System.out.println("Image type " + img.getType());
+
+        ImageWriterSpi spi = iw.getOriginatingProvider();
+        boolean bCanEncode = spi.canEncodeImage(img);
+
+        System.out.println("Can encode image? " + (bCanEncode ? "YES" : "NO"));
+        if (!bCanEncode) {
+            return true;
+        }
+        IIOImage iio_img = new IIOImage(img, null, md);
+
+        String fname = "test"+img.getType()+"."+suffixes[0];
+
+        iw.setOutput(ImageIO.createImageOutputStream(new FileOutputStream(new File(fname))));
+        System.out.print("write image ... ");
+        iw.write(iio_img);
+        System.out.println("OK");
+        System.out.print("read image ... ");
+
+        byte[] ba_image = baos.toByteArray();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+        ir.setInput(ImageIO.createImageInputStream(new FileInputStream(new File(fname))));
+
+        BufferedImage res = ir.read(0);
+        System.out.println("OK");
+
+        System.out.print("compare images ... ");
+        boolean r = compare(img,res);
+        System.out.println(r?"OK":"FAILED");
+        return r;
+    }
+
+    private boolean compare(BufferedImage in, BufferedImage out) {
+        int width = in.getWidth();
+        int height = in.getHeight();
+        if (out.getWidth() != width || out.getHeight() != height) {
+            throw new RuntimeException("Dimensions changed!");
+        }
+
+        Raster oldras = in.getRaster();
+        ColorModel oldcm = in.getColorModel();
+        Raster newras = out.getRaster();
+        ColorModel newcm = out.getColorModel();
+
+        for (int j = 0; j < height; j++) {
+            for (int i = 0; i < width; i++) {
+                Object oldpixel = oldras.getDataElements(i, j, null);
+                int oldrgb = oldcm.getRGB(oldpixel);
+                int oldalpha = oldcm.getAlpha(oldpixel);
+
+                Object newpixel = newras.getDataElements(i, j, null);
+                int newrgb = newcm.getRGB(newpixel);
+                int newalpha = newcm.getAlpha(newpixel);
+
+                if (newrgb != oldrgb ||
+                    newalpha != oldalpha) {
+                    throw new RuntimeException("Pixels differ at " + i +
+                                               ", " + j);
+                }
+            }
+        }
+        return true;
+    }
+
+
+    private static BufferedImage createTestImage(int type) throws IOException {
+
+        int w = 200;
+        int h = 200;
+        BufferedImage b = new BufferedImage(w, h, type);
+        Graphics2D g = b.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0,0, w, h);
+        g.setColor(Color.black);
+        g.fillOval(10, 10, w -20, h-20);
+
+        return b;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BMPWriteParamTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,175 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4641872
+ * @summary Tests writing compression modes of BMP plugin
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class BMPWriteParamTest {
+
+    static final String format = "BMP";
+
+    public static void main(String[] args) {
+
+        ImageWriter iw = null;
+        Iterator writers = ImageIO.getImageWritersByFormatName(format);
+        if (!writers.hasNext()) {
+            throw new RuntimeException("No available Image writer for "+format);
+        }
+        iw = (ImageWriter)writers.next();
+
+        try {
+            BufferedImage img = createTestImage();
+
+            BufferedImage bmp_res = getWriteResult(img, "BMP");
+            BufferedImage png_res = getWriteResult(img, "PNG");
+
+            compare(bmp_res, png_res);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new RuntimeException("Unexpected exception: " + ex);
+        }
+    }
+
+    private static BufferedImage getWriteResult(BufferedImage img,
+                                                String format
+                                                ) throws IOException {
+        ImageWriter iw = null;
+        Iterator writers = ImageIO.getImageWritersByFormatName(format);
+        while (writers.hasNext()) {
+            iw = (ImageWriter)writers.next();
+            System.out.println(format + " -> " + iw.toString());
+        }
+        if (iw==null) {
+            throw new RuntimeException("No available Image writer for "+format);
+        }
+        ImageWriteParam param = iw.getDefaultWriteParam();
+
+        param.setSourceRegion(new Rectangle(10, 10, 31, 31));
+        param.setSourceSubsampling(3, 3, 0, 0);
+
+        IIOMetadata meta = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param);
+
+        IIOImage iio_img = new IIOImage(img, null, meta);
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        iw.setOutput(ios);
+        iw.write(meta, iio_img, param);
+        ios.flush();
+
+        byte[] ba_image = baos.toByteArray();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+        ImageReader ir = null;
+
+        Iterator readers = ImageIO.getImageReadersByFormatName(format);
+        while (readers.hasNext()) {
+            ir = (ImageReader)readers.next();
+            System.out.println(format + " -> " + ir.toString());
+        }
+        if (ir==null) {
+            throw new RuntimeException("No available Image reader for "+format);
+        }
+
+        ir.setInput(ImageIO.createImageInputStream(bais));
+
+        BufferedImage res = ir.read(0);
+        return res;
+    }
+
+    private static BufferedImage createTestImage()
+      throws IOException {
+
+        int w = 50;
+        int h = 50;
+        BufferedImage b = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = b.createGraphics();
+        g.setColor(Color.red);
+        g.fillRect(0,0, w, h);
+        g.setColor(Color.white);
+        for (int i=10; i<=10+30; i+= 3) {
+            g.drawLine(i, 10, i, 40);
+            g.drawLine(10, i, 40, i);
+        }
+        return b;
+    }
+
+    private static boolean compare(final BufferedImage in,
+                                   final BufferedImage out)
+    {
+        final int width = in.getWidth();
+        int height = in.getHeight();
+        if (out.getWidth() != width || out.getHeight() != height) {
+            throw new RuntimeException("Dimensions changed!");
+        }
+
+        Raster oldras = in.getRaster();
+        ColorModel oldcm = in.getColorModel();
+        Raster newras = out.getRaster();
+        ColorModel newcm = out.getColorModel();
+
+        for (int j = 0; j < height; j++) {
+            for (int i = 0; i < width; i++) {
+                Object oldpixel = oldras.getDataElements(i, j, null);
+                int oldrgb = oldcm.getRGB(oldpixel);
+                int oldalpha = oldcm.getAlpha(oldpixel);
+
+                Object newpixel = newras.getDataElements(i, j, null);
+                int newrgb = newcm.getRGB(newpixel);
+                int newalpha = newcm.getAlpha(newpixel);
+
+                if (newrgb != oldrgb ||
+                    newalpha != oldalpha) {
+                    // showDiff(in, out);
+                    throw new RuntimeException("Pixels differ at " + i +
+                                               ", " + j + " new = " + Integer.toHexString(newrgb) + " old = " + Integer.toHexString(oldrgb));
+                }
+            }
+        }
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BmpBigDestinationTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4929367
+ * @summary tests what BMP image was decoded correctly if destination buffered
+ *          image is bigger than source image
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+
+public class BmpBigDestinationTest {
+    static String format = "BMP";
+    public static void main(String[] args) {
+        try {
+            BufferedImage src = new BufferedImage(100, 100,
+                                                  BufferedImage.TYPE_INT_RGB);
+            Graphics2D g = src.createGraphics();
+            g.setColor(Color.red);
+            g.fillRect(0,0,100, 100);
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+            ImageWriter iw =
+                (ImageWriter)ImageIO.getImageWritersByFormatName(format).next();
+            if (iw == null) {
+                throw new RuntimeException("No writer available. Test failed.");
+            }
+
+            iw.setOutput(ImageIO.createImageOutputStream(baos));
+            iw.write(src);
+
+            byte[] data = baos.toByteArray();
+
+            ImageReader ir =
+                (ImageReader)ImageIO.getImageReadersByFormatName(format).next();
+            ir.setInput(
+                ImageIO.createImageInputStream(
+                    new ByteArrayInputStream(data)));
+
+            Iterator specifiers = ir.getImageTypes(0);
+            ImageTypeSpecifier typeSpecifier = null;
+
+            if (specifiers.hasNext()) {
+                typeSpecifier = (ImageTypeSpecifier) specifiers.next();
+            }
+            ImageReadParam param = new ImageReadParam();
+            BufferedImage dst = typeSpecifier.createBufferedImage(200, 200);
+            param.setDestination(dst);
+
+            ir.read(0, param);
+
+            checkResults(src,dst);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Unexpected exception. Test failed.");
+        }
+    }
+
+    private static void checkResults(BufferedImage src, BufferedImage dst) {
+        for(int x=0; x<src.getWidth(); x++) {
+            for(int y=0; y<src.getHeight(); y++) {
+                int srcRgb = src.getRGB(x,y);
+                int dstRgb = dst.getRGB(x,y);
+                if (srcRgb != dstRgb) {
+                    throw new RuntimeException("Images are different at point ["
+                                               + x + "," + y + "]");
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/BmpDefaultImageMetadataTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4895512
+ * @summary Test that default image metadata for BMP image writer is not null
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+public class BmpDefaultImageMetadataTest {
+    ImageWriter writer = null;
+    IIOMetadata imageData = null;
+    ImageWriteParam writeParam = null;
+    BufferedImage bimg = null;
+
+    public BmpDefaultImageMetadataTest(String format) {
+        try {
+            bimg = new BufferedImage(200, 200, bimg.TYPE_INT_RGB);
+            Graphics gg = bimg.getGraphics();
+            gg.setColor(Color.red);
+            gg.fillRect(50, 50, 100, 100);
+
+            Iterator it = ImageIO.getImageWritersByFormatName(format);
+            if (it.hasNext()) {
+                writer = (ImageWriter) it.next();
+            }
+            if (writer == null) {
+                throw new RuntimeException("No writer available for the given format."
+                                           + " Test failed.");
+            }
+            writeParam = writer.getDefaultWriteParam();
+
+            System.out.println("Testing Image Metadata for "+format+"\n");
+            imageData = writer.getDefaultImageMetadata(new ImageTypeSpecifier(bimg), writeParam);
+            if (imageData == null) {
+                System.out.println("return value is null. No default image metadata is associated with "+format+" writer");
+                throw new RuntimeException("Default image metadata is null."
+                                           + " Test failed.");
+            }
+            int j = 0;
+            String imageDataNames[] = null;
+            if(imageData != null) {
+                System.out.println("Is standard metadata format supported (Image) ? "+
+                                   imageData.isStandardMetadataFormatSupported() );
+                imageDataNames = imageData.getMetadataFormatNames();
+                System.out.println("\nAll supported Metadata Format Names\n");
+                if(imageDataNames!=null){
+                    for(j=0; j<imageDataNames.length; j++)  {
+                        System.out.println("FORMAT NAME: "+imageDataNames[j]);
+                        if (imageDataNames[j].equals(imageData.getNativeMetadataFormatName())) {
+                            System.out.println("This is a Native Metadata format\n");
+                        } else {
+                            System.out.println("\n");
+                        }
+                        System.out.println("");
+                        System.out.println("IIOImageMetadata DOM tree for "+imageDataNames[j]);
+                        System.out.println("");
+                        Node imageNode = imageData.getAsTree(imageDataNames[j]);
+                        displayMetadata(imageNode);
+                        System.out.println("\n\n");
+                    }
+                }
+            }
+        }catch(Exception e){
+            e.printStackTrace();
+            throw new RuntimeException("Exception was thrown."
+                                       + " Test failed.");
+        }
+    }
+
+    public void displayMetadata(Node root) {
+        displayMetadata(root, 0);
+    }
+
+    void indent(int level) {
+        for (int i = 0; i < level; i++) {
+            System.out.print(" ");
+        }
+    }
+
+    void displayMetadata(Node node, int level) {
+        indent(level); // emit open tag
+        System.out.print("<" + node.getNodeName());
+        NamedNodeMap map = node.getAttributes();
+        if (map != null) { // print attribute values
+            int length = map.getLength();
+            for (int i = 0; i < length; i++) {
+                Node attr = map.item(i);
+                System.out.print(" " + attr.getNodeName() +
+                                 "=\"" + attr.getNodeValue() + "\"");
+            }
+        }
+        Node child = node.getFirstChild();
+
+        if (node.getNodeValue() != null && !node.getNodeValue().equals("") ) {
+            System.out.println(">");
+            indent(level);
+            System.out.println(node.getNodeValue());
+            indent(level); // emit close tag
+            System.out.println("</" + node.getNodeName() + ">");
+        } else  if (child != null) {
+            System.out.println(">"); // close current tag
+            while (child != null) { // emit child tags recursively
+                displayMetadata(child, level + 1);
+                child = child.getNextSibling();
+            }
+            indent(level); // emit close tag
+            System.out.println("</" + node.getNodeName() + ">");
+        } else {
+            System.out.println("/>");
+        }
+    }
+
+    public static void main(String args[]) {
+        BmpDefaultImageMetadataTest test = new BmpDefaultImageMetadataTest("bmp");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/CompressionModeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4893464
+ * @summary Tests bmp writer behavior with different compression modes
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.File;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CompressionModeTest {
+
+    public static void main(String args[]) {
+        int[] iModes = { ImageWriteParam.MODE_DISABLED,
+                         ImageWriteParam.MODE_EXPLICIT,
+                         ImageWriteParam.MODE_COPY_FROM_METADATA,
+                         ImageWriteParam.MODE_DEFAULT };
+
+        String[] strModes = { "ImageWriteParam.MODE_DISABLED",
+                              "ImageWriteParam.MODE_EXPLICIT",
+                              "ImageWriteParam.MODE_COPY_FROM_METADATA",
+                              "ImageWriteParam.MODE_DEFAULT" };
+
+        for(int i=0; i<iModes.length; i++) {
+            System.out.println("Test compression mode "+strModes[i]);
+            doTest(iModes[i]);
+        }
+    }
+
+    private static void doTest(int mode) {
+        String fileFormat = "bmp";
+        try {
+            ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix(fileFormat).next();
+            if(iw == null) {
+                throw new RuntimeException("No available image writer for "
+                                           + fileFormat
+                                           + " Test failed.");
+            }
+
+            File file = new File("image." + fileFormat);
+            ImageOutputStream ios = ImageIO.createImageOutputStream(file);
+            iw.setOutput(ios);
+
+            BufferedImage bimg = new BufferedImage(100,
+                                                   100, BufferedImage.TYPE_INT_RGB);
+            Graphics g = bimg.getGraphics();
+            g.setColor(Color.green);
+            g.fillRect(0,0,100,100);
+
+            ImageWriteParam param = iw.getDefaultWriteParam();
+
+            param.setCompressionMode(mode);
+
+            IIOMetadata meta = iw.getDefaultImageMetadata(new ImageTypeSpecifier(bimg),
+                                                          param);
+
+            IIOImage iioImg = new IIOImage(bimg, null, meta);
+            iw.write(null, iioImg, param);
+        } catch(Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Test failed.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/EmbeddedFormatTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6294920 6294926
+ * @summary Test verifies that BMP images with compression types BI_JPEG and
+ *          BI_PNG are read correctly in case of 1, 8, 16, 24 and 32 bpp
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class EmbeddedFormatTest {
+    ImageWriter writer;
+    ImageReader reader;
+
+    static int[] bi_types = {
+        BufferedImage.TYPE_INT_RGB,
+        BufferedImage.TYPE_3BYTE_BGR,
+        BufferedImage.TYPE_USHORT_555_RGB,
+        BufferedImage.TYPE_BYTE_GRAY,
+        BufferedImage.TYPE_BYTE_BINARY
+    };
+
+    public EmbeddedFormatTest() {
+        writer = ImageIO.getImageWritersByFormatName("BMP").next();
+        reader = ImageIO.getImageReadersByFormatName("BMP").next();
+    }
+
+    public void doTest(String compression, int bi_type) throws IOException {
+        System.out.println("Test " + compression + " on " + getImageTypeName(bi_type));
+        BufferedImage src = createTestImage(bi_type);
+        writer.reset();
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios =
+                ImageIO.createImageOutputStream(baos);
+        writer.setOutput(ios);
+
+        ImageWriteParam wparam = prepareWriteParam(compression);
+        writer.write(null, new IIOImage(src, null, null), wparam);
+        ios.flush();
+        ios.close();
+
+        // read result
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ImageInputStream iis = ImageIO.createImageInputStream(bais);
+        reader.reset();
+        reader.setInput(iis);
+
+        BufferedImage dst = reader.read(0);
+
+        checkResult(dst);
+    }
+
+    protected BufferedImage createTestImage(int type) {
+        BufferedImage img = new BufferedImage(200, 200, type);
+        Graphics g = img.createGraphics();
+        g.setColor(Color.black);
+        g.fillRect(0, 0, 200, 200);
+        g.setColor(Color.white);
+        g.fillRect(50, 50, 100, 100);
+
+        return img;
+    }
+
+    protected void  checkResult(BufferedImage img) {
+        int imgBlack = img.getRGB(25, 25);
+        if (imgBlack != 0xff000000) {
+            throw new RuntimeException("Wrong black color: " +
+                    Integer.toHexString(imgBlack));
+        }
+
+        int imgWhite = img.getRGB(100, 100);
+        if (imgWhite != 0xffffffff) {
+            throw new RuntimeException("Wrong white color: " +
+                    Integer.toHexString(imgWhite));
+        }
+    }
+
+    protected ImageWriteParam prepareWriteParam(String compression) {
+        ImageWriteParam imageWriteParam = writer.getDefaultWriteParam();
+        imageWriteParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+        imageWriteParam.setCompressionType(compression);
+        return imageWriteParam;
+    }
+
+
+    public static void main(String[] args) throws IOException {
+        EmbeddedFormatTest t = new EmbeddedFormatTest();
+
+        for (int i = 0; i < bi_types.length; i++) {
+            t.doTest("BI_JPEG", bi_types[i]);
+            t.doTest("BI_PNG",  bi_types[i]);
+        }
+    }
+
+    static String getImageTypeName(int type) {
+        switch(type) {
+            case BufferedImage.TYPE_INT_RGB:
+                return "TYPE_INT_RGB";
+            case BufferedImage.TYPE_3BYTE_BGR:
+                return "TYPE_3BYTE_BGR";
+            case BufferedImage.TYPE_USHORT_555_RGB:
+                return "TYPE_USHORT_555_RGB";
+            case BufferedImage.TYPE_BYTE_GRAY:
+                return "TYPE_BYTE_GRAY";
+            case BufferedImage.TYPE_BYTE_BINARY:
+                return "TYPE_BYTE_BINARY";
+            default:
+                return "TBD";
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/EmptyInputBmpMetadataTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4895483
+ * @summary Test checks that the IllegalStateException was thrown if input was
+ *          not set to the BMPImageReader
+ */
+
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.metadata.IIOMetadata;
+
+public class EmptyInputBmpMetadataTest {
+    private static String fmt = "BMP";
+
+    public static void main(String[] args) {
+        boolean isPassed = false;
+        ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(fmt).next();
+
+        if (ir == null) {
+            throw new RuntimeException("No available reader for " + fmt);
+        }
+        IIOMetadata meta = null;
+        try {
+            meta = ir.getImageMetadata(0);
+        } catch (IllegalStateException e) {
+            System.out.println("Correct exception was thrown. Test passed.");
+            isPassed = true;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        if (!isPassed) {
+            throw new RuntimeException("The IllegalStateException was not thrown."
+                                       +"Test failed.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/NoExtraBytesTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,301 @@
+/*
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 5076878
+ * @summary Test verifies that ImageIO creates BMP images with correct bpp
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.DirectColorModel;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Hashtable;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageInputStream;
+
+import org.w3c.dom.Node;
+
+public class NoExtraBytesTest {
+
+    private static Hashtable<Integer, Integer> tests = null;
+    private static Color[] usedColors = new Color[] { Color.red, Color.green,     Color.blue, Color.yellow, Color.white, Color.black };
+
+    private static final int TYPE_INT_GRB = 0x100;
+    private static final int TYPE_INT_GBR = 0x101;
+    private static final int TYPE_INT_RBG = 0x102;
+    private static final int TYPE_INT_BRG = 0x103;
+    private static final int TYPE_INT_555_GRB = 0x104;
+    private static final int TYPE_3BYTE_RGB = 0x105;
+    private static final int TYPE_3BYTE_GRB = 0x106;
+
+    private static final int w = 300;
+    private static final int h = 200;
+    private static final int dx = w / usedColors.length;
+
+    public static void main(String[] args) throws IOException {
+        initTests();
+
+        for (Integer type : tests.keySet()) {
+            new NoExtraBytesTest(type.intValue(), tests.get(type).intValue()).doTest();
+        }
+        System.out.println("Test passed.");
+    }
+
+    private static void initTests() {
+        tests = new Hashtable<Integer, Integer>();
+
+        tests.put(new Integer(BufferedImage.TYPE_INT_RGB), new Integer(24));
+        tests.put(new Integer(BufferedImage.TYPE_INT_BGR), new Integer(24));
+        tests.put(new Integer(BufferedImage.TYPE_3BYTE_BGR), new Integer(24));
+        tests.put(new Integer(TYPE_INT_GRB), new Integer(24));
+        tests.put(new Integer(TYPE_INT_GBR), new Integer(24));
+        tests.put(new Integer(TYPE_INT_RBG), new Integer(24));
+        tests.put(new Integer(TYPE_INT_BRG), new Integer(24));
+        tests.put(new Integer(BufferedImage.TYPE_USHORT_555_RGB), new Integer(16));
+        tests.put(new Integer(BufferedImage.TYPE_USHORT_565_RGB), new Integer(16));
+        tests.put(new Integer(TYPE_INT_555_GRB), new Integer(16));
+        tests.put(new Integer(TYPE_3BYTE_RGB), new Integer(24));
+        tests.put(new Integer(TYPE_3BYTE_GRB), new Integer(24));
+    }
+
+    private static String getImageTypeName(int t) {
+        switch(t) {
+            case BufferedImage.TYPE_INT_RGB:
+                return "TYPE_INT_RGB";
+            case BufferedImage.TYPE_INT_BGR:
+                return "TYPE_INT_BGR";
+            case BufferedImage.TYPE_3BYTE_BGR:
+                return "TYPE_3BYTE_BGR";
+            case BufferedImage.TYPE_USHORT_555_RGB:
+                return "TYPE_USHORT_555_RGB";
+            case BufferedImage.TYPE_USHORT_565_RGB:
+                return "TYPE_USHORT_565_RGB";
+            case TYPE_INT_GRB:
+                return "TYPE_INT_GRB";
+            case TYPE_INT_GBR:
+                return "TYPE_INT_GBR";
+            case TYPE_INT_RBG:
+                return "TYPE_INT_RBG";
+            case TYPE_INT_BRG:
+                return "TYPE_INT_BRG";
+            case TYPE_INT_555_GRB:
+                return "TYPE_INT_555_GRB";
+            case TYPE_3BYTE_RGB:
+                return "TYPE_3BYTE_RGB";
+            case TYPE_3BYTE_GRB:
+                return "TYPE_3BYTE_GRB";
+            default:
+                throw new IllegalArgumentException("Unknown image type: " + t);
+        }
+    }
+    private static BufferedImage createTestImage(int type) {
+        BufferedImage dst = null;
+        ColorModel colorModel = null;
+        WritableRaster raster = null;
+        ColorSpace cs = null;
+        System.out.println("Create image for " + getImageTypeName(type));
+        switch(type) {
+            case TYPE_INT_GRB:
+                colorModel = new DirectColorModel(24,
+                    0x0000ff00,
+                    0x00ff0000,
+                    0x000000ff);
+                break;
+            case TYPE_INT_GBR:
+                colorModel = new DirectColorModel(24,
+                    0x000000ff,
+                    0x00ff0000,
+                    0x0000ff00);
+                break;
+            case TYPE_INT_RBG:
+                colorModel = new DirectColorModel(24,
+                    0x00ff0000,
+                    0x000000ff,
+                    0x0000ff00);
+                break;
+            case TYPE_INT_BRG:
+                colorModel = new DirectColorModel(24,
+                    0x0000ff00,
+                    0x000000ff,
+                    0x00ff0000);
+                break;
+            case TYPE_INT_555_GRB:
+                colorModel = new DirectColorModel(24,
+                        0x0000001F,
+                        0x000003e0,
+                        0x00007c00);
+                break;
+            case TYPE_3BYTE_RGB:
+                cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+                int[] nBits = {8, 8, 8};
+                int[] bOffs = {0, 1, 2};
+                colorModel = new ComponentColorModel(cs, nBits, false, false,
+                                                     Transparency.OPAQUE,
+                                                     DataBuffer.TYPE_BYTE);
+                raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,
+                                                        w, h,
+                                                        w*3, 3,
+                                                        bOffs, null);
+                break;
+            case TYPE_3BYTE_GRB:
+                cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+                //nBits = {8, 8, 8};
+                //bOffs = {0, 1, 2};
+                colorModel = new ComponentColorModel(cs, new int[] { 8, 8, 8 }, false, false,
+                                                     Transparency.OPAQUE,
+                                                     DataBuffer.TYPE_BYTE);
+                raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,
+                        w, h,
+                        w*3, 3,
+                        new int[] { 1, 0, 2}, null);
+                break;
+            default:
+                dst = new BufferedImage(w, h, type);
+                //colorModel = ImageTypeSpecifier.createFromBufferedImageType(type).getColorModel();
+        }
+
+        if (dst == null) {
+            if (raster == null) {
+                raster = colorModel.createCompatibleWritableRaster(w, h);
+            }
+
+            dst = new BufferedImage(colorModel, raster, false, null);
+        }
+        Graphics g = dst.createGraphics();
+        for (int i = 0; i < usedColors.length; i ++) {
+            g.setColor(usedColors[i]);
+            g.fillRect(i * dx, 0, dx, h);
+        }
+        g.dispose();
+
+        return dst;
+    }
+
+    private BufferedImage src;
+    private int expectedColorDepth;
+    private int type;
+
+    private IIOImage iio_dst;
+
+    public NoExtraBytesTest(int type, int expectedColorDepth) {
+        this.type = type;
+        this.src = createTestImage(type);
+        this.expectedColorDepth = expectedColorDepth;
+    }
+
+    public void doTest() throws IOException {
+        // write src as BMP
+        System.out.println("Test for image: " + getImageTypeName(type));
+        System.out.println("image is " + src);
+
+        File f = File.createTempFile("sizeTest_", ".bmp", new File("."));
+        System.out.println("Use file " + f.getCanonicalPath());
+        ImageIO.write(src, "BMP", f);
+
+        //read it again
+        read(f);
+
+        checkColorDepth();
+
+        checkImageContent();
+    }
+
+    private void read(File f) throws IOException {
+        ImageReader reader = ImageIO.getImageReadersByFormatName("BMP").next();
+
+        ImageInputStream iis =
+                ImageIO.createImageInputStream(new FileInputStream(f));
+
+        reader.setInput(iis);
+
+        iio_dst = reader.readAll(0, reader.getDefaultReadParam());
+    }
+
+    private void checkColorDepth() {
+        IIOMetadata dst = iio_dst.getMetadata();
+
+        Node data = dst.getAsTree("javax_imageio_bmp_1.0");
+
+        Node n = data.getFirstChild();
+
+        while (n != null && !("BitsPerPixel".equals(n.getNodeName()))) {
+            System.out.println("Node " + n.getNodeName());
+            n = n.getNextSibling();
+        }
+        if (n == null) {
+            throw new RuntimeException("No BitsPerSample node!");
+        }
+
+        int bpp = 0;
+        String value = n.getNodeValue();
+        System.out.println("value = " + value);
+        try {
+            bpp = Integer.parseInt(value);
+        } catch (NumberFormatException e) {
+            throw new RuntimeException("Wrong bpp value: " + value, e);
+        }
+
+        if (bpp != this.expectedColorDepth) {
+            throw new RuntimeException("Wrong color depth: " + bpp +
+                    " (should be " + this.expectedColorDepth + ")");
+        }
+    }
+
+    private void checkImageContent() {
+        BufferedImage dst =
+                (BufferedImage)iio_dst.getRenderedImage();
+        int y = h / 2;
+        int x = dx / 2;
+
+        for (int i = 0; i < usedColors.length; i++, x += dx) {
+            int srcRgb = src.getRGB(x, y);
+            int dstRgb = dst.getRGB(x, y);
+            int rgb = usedColors[i].getRGB();
+
+            if (dstRgb != srcRgb || dstRgb != rgb) {
+                throw new RuntimeException("Wrong color at [" + x + ", " + y +
+                        "] " + Integer.toHexString(dstRgb) +
+                        " (srcRgb=" + Integer.toHexString(srcRgb) +
+                        ", original color is " + Integer.toHexString(rgb) + ")");
+            }
+
+        }
+        System.out.println("Image colors are OK.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/RLECompressionTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6332480
+ * @summary Test verifies that images encoded as BMP with RLE4 or RLE8
+ *          compression type are read correctly
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class RLECompressionTest {
+    public static final int TEST_RLE8 = 0x01;
+    public static final int TEST_RLE4 = 0x02;
+
+    private static Color[] usedColors = new Color[] {
+        Color.black, Color.white, Color.red,
+        Color.green, Color.blue, Color.yellow };
+
+    int w = 100;
+    // NB: problem occurs when image height > width
+    // The problem manifestation is that only first w
+    // lines of image are filled by decoded data,
+    // rest of image (all lines below (w-1)-th line)
+    // is leaved uninitialized (black).
+    // In order to verify that this problem is solved,
+    // we use image with height > width.
+    int h = 2 * w;
+
+    private IndexColorModel getTestColorModel(int type) {
+        IndexColorModel icm = null;
+        int bpp = 8;
+        int size = 256;
+
+        switch(type) {
+            case TEST_RLE8:
+                bpp = 8;
+                size = 256;
+                break;
+            case TEST_RLE4:
+                bpp = 4;
+                size = 16;
+                break;
+            default:
+                throw new IllegalArgumentException("Wrong test type: " + type);
+        }
+
+        byte[] palette = new byte[size * 3];
+        for (int i = 0; i < usedColors.length; i++) {
+            palette[3 * i] = (byte)(0xff & usedColors[i].getRed());
+            palette[3 * i + 1] = (byte)(0xff & usedColors[i].getGreen());
+            palette[3 * i + 2] = (byte)(0xff & usedColors[i].getBlue());
+        }
+        // rest of palette is black
+
+        icm = new IndexColorModel(bpp, size, palette, 0, false);
+        return icm;
+    }
+
+    private BufferedImage getTestImage(int type) {
+        BufferedImage src = null;
+        IndexColorModel icm = getTestColorModel(type);
+        src = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_INDEXED, icm);
+        Graphics2D g = src.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0, 0, w, h);
+        g.dispose();
+
+        return src;
+    }
+
+    public void doTest(int type) throws IOException {
+        BufferedImage src = getTestImage(type);
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+
+        ImageWriter writer = ImageIO.getImageWritersByFormatName("BMP").next();
+        writer.setOutput(ios);
+
+        ImageWriteParam wparam = writer.getDefaultWriteParam();
+        wparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+        switch(type) {
+            case TEST_RLE8:
+                wparam.setCompressionType("BI_RLE8");
+                break;
+            case TEST_RLE4:
+                wparam.setCompressionType("BI_RLE4");
+                break;
+            default:
+                throw new IllegalArgumentException("Wrong test type: " + type);
+        }
+
+        writer.write(null, new IIOImage(src, null, null), wparam);
+
+        ios.close();
+        baos.close();
+
+        // read result
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+        BufferedImage dst = ImageIO.read(bais);
+
+        checkResult(src, dst);
+    }
+
+    private void checkResult(BufferedImage src, BufferedImage dst) {
+        int x = w / 2;
+        for (int y = 0; y < h; y++) {
+            int srcRgb = src.getRGB(x, y);
+            int dstRgb = dst.getRGB(x, y);
+
+            if (srcRgb != dstRgb) {
+                throw new RuntimeException("Test failed due to color difference: " +
+                        Integer.toHexString(dstRgb) + " instead of " + Integer.toHexString(srcRgb) +
+                        " at [" + x + ", " + y + "]");
+            }
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+        RLECompressionTest test = new RLECompressionTest();
+        test.doTest(TEST_RLE8);
+        test.doTest(TEST_RLE4);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/ReaderListenersTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,257 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4924507
+ * @summary Test that listeners of bmp reader receive correct events in case of
+ *          BI_JPEG and BI_PNG compression types
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOReadProgressListener;
+import javax.imageio.event.IIOReadUpdateListener;
+
+public class ReaderListenersTest {
+    public static final String[] compTypes = { "BI_JPEG", "BI_PNG" };
+
+    public static void main(String[] args) {
+        for (int i=0; i< compTypes.length; i++) {
+            doTest(compTypes[i]);
+        }
+    }
+
+    private static void doTest(String compression) {
+        try {
+            BufferedImage img = createTestImage();
+
+            ImageWriter iw = (ImageWriter)
+                ImageIO.getImageWritersByFormatName("bmp").next();
+            if (iw == null) {
+                throw new RuntimeException("No writers for bmp format."
+                                           + " Test failed.");
+            }
+
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            iw.setOutput(ImageIO.createImageOutputStream(baos));
+            ImageWriteParam param = iw.getDefaultWriteParam();
+            param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+            param.setCompressionType(compression);
+
+            iw.write(null, new IIOImage(img, null, null), param);
+            baos.close();
+
+            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+            ImageReader ir = (ImageReader)
+                ImageIO.getImageReadersByFormatName("bmp").next();
+            if (ir == null) {
+                throw new RuntimeException("No readers for bmp format."
+                                           + " Test failed.");
+            }
+
+            IIOReadUpdateAdapter updateAdapter = new IIOReadUpdateAdapter();
+            IIOReadProgressAdapter progressAdapter = new IIOReadProgressAdapter();
+            ir.addIIOReadProgressListener(progressAdapter);
+            ir.addIIOReadUpdateListener(updateAdapter);
+            ir.setInput(ImageIO.createImageInputStream(bais));
+            BufferedImage dst = ir.read(0);
+
+            progressAdapter.checkResults();
+
+            if (!updateAdapter.isImageUpdateUsed) {
+                throw new RuntimeException("imageUpdate was not used."
+                                           + " Test failed.");
+            }
+        } catch(IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Test failed");
+        }
+    }
+
+    protected static BufferedImage createTestImage() {
+        BufferedImage res = new BufferedImage(100, 100,
+                                              BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = res.createGraphics();
+        g.setColor(Color.red);
+        g.fillRect(0,0, 100,100);
+        return res;
+    }
+
+    static class IIOReadProgressAdapter implements IIOReadProgressListener {
+        List progress = new ArrayList();
+        public boolean isTestPassed = false;
+        private boolean isImageStarted = false;
+        private boolean isImageComplete = false;
+        private boolean isSequenceComplete = false;
+        private boolean isSequenceStarted = false;
+
+        public void imageComplete(ImageReader source) {
+            System.out.println("Image completed");
+            if (!isImageComplete) {
+                isImageComplete = true;
+            } else {
+                throw new RuntimeException("The imageComplete() is called twice."
+                                           + " Test failed.");
+            }
+            checkProgress();
+        }
+
+        public void imageProgress(ImageReader source, float percentageDone) {
+            System.out.println("Image Progress "+percentageDone);
+            progress.add(new Float(percentageDone));
+        }
+
+        public void imageStarted(ImageReader source, int imageIndex) {
+            System.out.println("Image Started "+imageIndex);
+            if (!isImageStarted) {
+                isImageStarted = true;
+            } else {
+                throw new RuntimeException("The imageStarted() was called twice. "
+                                           + " Test failed.");
+            }
+            progress.clear();
+        }
+
+        public void thumbnailComplete(ImageReader source)  {
+            System.out.println("Thubnail completed");
+        }
+
+        public void thumbnailProgress(ImageReader source,
+                                      float percentageDone)
+        {
+            System.out.println("Thubnail Progress " + percentageDone);
+        }
+
+        public void thumbnailStarted(ImageReader source,
+                                     int imageIndex, int thumbnailIndex)
+        {
+            System.out.println("Thubnail started " + imageIndex);
+        }
+
+        public void sequenceComplete(ImageReader source) {
+            if (!isSequenceComplete) {
+                isSequenceComplete = true;
+            } else {
+                throw new RuntimeException("The imageComplete() is called twice."
+                                           + " Test failed.");
+            }
+        }
+
+        public void sequenceStarted(ImageReader source, int minIndex) {
+            if (!isSequenceStarted) {
+                isSequenceStarted = true;
+            } else {
+                throw new RuntimeException("The imageComplete() is called twice."
+                                           + " Test failed.");
+            }
+        }
+
+        public void readAborted(ImageReader source) {
+            System.out.println("read Aborted");
+            checkProgress();
+        }
+
+        private void checkProgress() {
+            Iterator i = progress.iterator();
+            if (!i.hasNext()) {
+                throw new RuntimeException("progress values list is empty!");
+            }
+            float val = ((Float)i.next()).floatValue();
+            while(i.hasNext()) {
+                float next = ((Float)i.next()).floatValue();
+                if (val >= next) {
+                    throw new RuntimeException("progress values do not increase!");
+                }
+                val = next;
+            }
+            isTestPassed = true;
+            System.out.println("Test passed.");
+        }
+
+        public void checkResults() {
+            if (isImageStarted && !isImageComplete) {
+                throw new RuntimeException("The imageCompleted was not called."
+                                           + " Test failed.");
+            }
+        }
+    }
+
+    static class IIOReadUpdateAdapter implements IIOReadUpdateListener {
+        boolean isImageUpdateUsed = false;
+        public void imageUpdate(ImageReader source, BufferedImage theImage,
+                                int minX, int minY, int width, int height,
+                                int periodX, int periodY, int[] bands)
+        {
+            System.out.println("imageUpdate");
+            isImageUpdateUsed = true;
+        }
+        public void passComplete(ImageReader source, BufferedImage theImage) {
+            System.out.println("passComplete");
+        }
+        public void passStarted(ImageReader source, BufferedImage theImage,
+                                int pass, int minPass, int maxPass,
+                                int minX, int minY, int periodX, int periodY,
+                                int[] bands)
+        {
+            System.out.println("passStarted");
+        }
+        public void thumbnailPassComplete(ImageReader source,
+                                          BufferedImage theThumbnail)
+        {
+            System.out.println("thumbnailPassComplete");
+        }
+        public void thumbnailPassStarted(ImageReader source,
+                                         BufferedImage theThumbnail,
+                                         int pass, int minPass, int maxPass,
+                                         int minX, int minY,
+                                         int periodX, int periodY,
+                                         int[] bands)
+        {
+            System.out.println("thumbnailPassStarted");
+        }
+        public void thumbnailUpdate(ImageReader source,
+                                    BufferedImage theThumbnail,
+                                    int minX, int minY,
+                                    int width, int height,
+                                    int periodX, int periodY, int[] bands)
+        {
+            System.out.println("thumbnailUpdate");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/RleEncodingTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4893446
+ * @summary Tests that we get IOException if we try to encode the incompatible
+ *          image with RLE compression
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class RleEncodingTest {
+
+    private static int testIdx = 1;
+
+    public static void main(String args[]) throws Exception {
+        try {
+            int mode = ImageWriteParam.MODE_EXPLICIT;
+            String type = "BI_RLE4";
+            doTest(type, mode);
+
+            type = "BI_RLE8";
+            doTest(type, mode);
+
+            mode = ImageWriteParam.MODE_DEFAULT;
+            type = "BI_RLE4";
+            doTest(type, mode);
+
+            type = "BI_RLE8";
+            doTest(type, mode);
+
+            System.out.println("Test 4bpp image.");
+            encodeRLE4Test();
+
+            System.out.println("Test 8bpp image.");
+            encodeRLE8Test();
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Unexpected exception. Test failed");
+        }
+    }
+
+    private static void doTest(String compressionType,
+                               int compressionMode) throws IOException
+    {
+        BufferedImage bimg = new BufferedImage(100, 100,
+                                               BufferedImage.TYPE_INT_RGB);
+        Graphics g = bimg.getGraphics();
+        g.setColor(Color.green);
+        g.fillRect(0, 0, 100, 100);
+
+        doTest(bimg, compressionType, compressionMode);
+    }
+
+    private static void encodeRLE4Test() throws IOException {
+        // create 4bpp image
+        byte[] r = new byte[16];
+        r[0] = (byte)0xff;
+        byte[] g = new byte[16];
+        g[1] = (byte)0xff;
+        byte[] b = new byte[16];
+        b[2] = (byte)0xff;
+        IndexColorModel icm = new IndexColorModel(4, 16, r, g, b);
+
+        BufferedImage bimg = new BufferedImage(100, 100,
+                                               BufferedImage.TYPE_BYTE_BINARY,
+                                               icm);
+
+        Graphics gr = bimg.getGraphics();
+        gr.setColor(Color.green);
+        gr.fillRect(0, 0, 100, 100);
+
+        doTest(bimg, "BI_RLE4", ImageWriteParam.MODE_EXPLICIT);
+    }
+
+    private static void encodeRLE8Test() throws IOException {
+        // create 8bpp image
+        byte[] r = new byte[256];
+        r[0] = (byte)0xff;
+        byte[] g = new byte[256];
+        g[1] = (byte)0xff;
+        byte[] b = new byte[256];
+        b[2] = (byte)0xff;
+        IndexColorModel icm = new IndexColorModel(8, 256, r, g, b);
+
+        BufferedImage bimg = new BufferedImage(100, 100,
+                                               BufferedImage.TYPE_BYTE_INDEXED,
+                                               icm);
+        Graphics gr = bimg.getGraphics();
+        gr.setColor(Color.green);
+        gr.fillRect(0, 0, 100, 100);
+
+        doTest(bimg, "BI_RLE8", ImageWriteParam.MODE_EXPLICIT);
+    }
+
+    private static void doTest(BufferedImage src,
+                               String compressionType,
+                               int compressionMode) throws IOException
+    {
+
+        ImageWriter iw =  (ImageWriter)ImageIO.getImageWritersBySuffix("bmp").next();
+        if (iw == null) {
+            throw new RuntimeException("No available writer. Test failed.");
+        }
+
+        IIOImage iioImg = new IIOImage(src, null, null);
+        ImageWriteParam param = iw.getDefaultWriteParam();
+
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        iw.setOutput(ios);
+
+        System.out.println("Compression Type is " + compressionType);
+        System.out.println("Compression Mode is " + compressionMode);
+
+        param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+        param.setCompressionType(compressionType);
+        if (compressionMode != ImageWriteParam.MODE_EXPLICIT) {
+            param.setCompressionMode(compressionMode);
+        }
+        try {
+            iw.write(null, iioImg, param);
+        } catch (IOException e) {
+            int bpp = src.getColorModel().getPixelSize();
+            if (compressionMode == ImageWriteParam.MODE_EXPLICIT) {
+                if ((compressionType.equals("BI_RLE4") && bpp != 4)
+                    || (compressionType.equals("BI_RLE8") && bpp != 8))
+                {
+                    System.out.println("Can not encode "+ bpp+ "bpp image as"
+                                      + compressionType);
+                    return;
+                } else {
+                    throw new RuntimeException("Unable to encode "
+                                               + bpp + "bpp image as "
+                                               + compressionType
+                                               + ". Test failed");
+                }
+            }
+        }
+        baos.close();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ImageInputStream iis = ImageIO.createImageInputStream(bais);
+
+        BufferedImage dst = ImageIO.read(iis);
+
+        int w = src.getWidth();
+        int h = src.getHeight();
+
+        Object dstPixel = dst.getRaster().getDataElements(w/2, h/2, null);
+        Object srcPixel = src.getRaster().getDataElements(w/2, h/2, null);
+
+        if ( (src.getColorModel().getRed(srcPixel)
+              != dst.getColorModel().getRed(dstPixel))
+             || (src.getColorModel().getGreen(srcPixel)
+                 != dst.getColorModel().getGreen(dstPixel))
+             || (src.getColorModel().getBlue(srcPixel)
+                 != dst.getColorModel().getBlue(dstPixel))
+             || (src.getColorModel().getAlpha(srcPixel)
+                 != dst.getColorModel().getAlpha(dstPixel)) ) {
+
+            showPixel(src, w/2, h/2);
+            showPixel(dst, w/2, h/2);
+
+            throw new RuntimeException(
+                "Colors are different: " +
+                Integer.toHexString(src.getColorModel().getRGB(srcPixel))
+                + " and " +
+                Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+        }
+
+    }
+
+    private static void showPixel(BufferedImage src, int x, int y) {
+        System.out.println("Img is " + src);
+        Object p = src.getRaster().getDataElements(x, y, null);
+        System.out.println("RGB:   " +
+                           Integer.toHexString(src.getColorModel().getRGB(p)));
+        System.out.println("Red:   " +
+                           Integer.toHexString(src.getColorModel().getRed(p)));
+        System.out.println("Green: " +
+                           Integer.toHexString(src.getColorModel().getGreen(p)));
+        System.out.println("Blue:  " +
+                           Integer.toHexString(src.getColorModel().getBlue(p)));
+        System.out.println("Alpha: " +
+                           Integer.toHexString(src.getColorModel().getAlpha(p)));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/TestCompressionBI_BITFIELDS.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6297016 6294960 6294965 6294984
+ * @summary Test verifies that buffered images are written correctly if
+ *          compression BI_BITFIELDS is used
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+
+public class TestCompressionBI_BITFIELDS {
+
+    protected String format = "BMP";
+
+    protected ImageReader reader;
+
+    protected ImageWriter writer;
+
+    protected boolean doSave = true;
+
+    Color[] colors = {
+        Color.red, Color.green, Color.blue,
+        Color.yellow, Color.white, Color.black};
+
+    int dx = 50;
+    int h = 200;
+
+    public TestCompressionBI_BITFIELDS() {
+        this("BMP");
+    }
+
+    public TestCompressionBI_BITFIELDS(String format) {
+        this.format = format;
+        reader = ImageIO.getImageReadersByFormatName(format).next();
+        writer = ImageIO.getImageWritersByFormatName(format).next();
+    }
+
+    protected ImageWriteParam prepareWriteParam(BufferedImage src) {
+        ImageWriteParam wparam = writer.getDefaultWriteParam();
+        wparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+        wparam.setCompressionType("BI_BITFIELDS");
+
+        return wparam;
+    }
+
+    public BufferedImage writeAndRead(BufferedImage src) throws IOException {
+        writer.reset();
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        writer.setOutput(ImageIO.createImageOutputStream(baos));
+
+        ImageWriteParam wparam = prepareWriteParam(src);
+
+        IIOImage img = new IIOImage(src, null, null);
+
+        writer.write(null, img, wparam);
+
+        if (doSave) {
+            // save images to file in order to be able to check
+            // that image is well-formed using standard windows tools.
+            File f = File.createTempFile("wr_test_", "." + format, new File("."));
+            System.out.println("Save to file: " + f.getCanonicalPath());
+            FileOutputStream fos = new FileOutputStream(f);
+            fos.write(baos.toByteArray());
+            fos.flush();
+            fos.close();
+        }
+
+        // read result
+        reader.reset();
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        reader.setInput(ImageIO.createImageInputStream(bais));
+
+        return reader.read(0);
+    }
+
+    public static void main(String[] args) throws IOException {
+        // buffered image types listed below can be saved as BI_BITFIELDS BMP
+        int[] types = {BufferedImage.TYPE_3BYTE_BGR,
+                       BufferedImage.TYPE_USHORT_555_RGB,
+                       BufferedImage.TYPE_USHORT_565_RGB,
+                       BufferedImage.TYPE_BYTE_GRAY,
+                       BufferedImage.TYPE_BYTE_BINARY,
+                       BufferedImage.TYPE_BYTE_INDEXED,
+                       BufferedImage.TYPE_INT_BGR,
+                       BufferedImage.TYPE_INT_RGB};
+
+        for (int i = 0; i < types.length; i++) {
+            System.out.println("Test image " + types[i]);
+            TestCompressionBI_BITFIELDS t = new TestCompressionBI_BITFIELDS();
+
+            BufferedImage src =
+                t.createTestImage(types[i]);
+            System.out.println("Image for test: " + src);
+            System.out.println("SampleModel: " + src.getSampleModel());
+
+            BufferedImage dst = null;
+            try {
+                dst = t.writeAndRead(src);
+            } catch (IOException e) {
+                e.printStackTrace(System.out);
+            }
+
+
+            t.compareImages(src, dst);
+        }
+    }
+
+    protected BufferedImage createTestImage(int type) {
+        BufferedImage bimg = new BufferedImage(dx * colors.length, h, type);
+        Graphics2D g = bimg.createGraphics();
+
+        for (int i = 0; i < colors.length; i++) {
+            g.setColor(colors[i]);
+            g.fillRect(dx * i, 0, dx, h);
+        }
+        return bimg;
+    }
+
+    protected void compareImages(BufferedImage src, BufferedImage dst) {
+        ColorSpace srcCS = src.getColorModel().getColorSpace();
+        ColorSpace dstCS = dst.getColorModel().getColorSpace();
+        if (!srcCS.equals(dstCS) && srcCS.getType() == ColorSpace.TYPE_GRAY) {
+            System.out.println("Workaround color difference with GRAY.");
+            BufferedImage tmp  =
+                new BufferedImage(src.getWidth(), src.getHeight(),
+                                  BufferedImage.TYPE_INT_RGB);
+            Graphics g = tmp.createGraphics();
+            g.drawImage(src, 0, 0, null);
+            src = tmp;
+        }
+        int y = h / 2;
+        for (int i = 0; i < colors.length; i++) {
+            int x = dx * i + dx / 2;
+            int srcRgb = src.getRGB(x, y);
+            int dstRgb = dst.getRGB(x, y);
+
+            if (srcRgb != dstRgb) {
+                throw new RuntimeException("Test failed due to color difference: " +
+                                           "src_pixel=" + Integer.toHexString(srcRgb) +
+                                           "dst_pixel=" + Integer.toHexString(dstRgb));
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/Write3ByteBgrTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4892194 8014427
+ * @summary Test checks that we able to encode TYPE_3BYTE_BGR images to bmp
+ *          format. Test failed if ArrayIndexOutOfBoundsException will be thrown
+ *          or pixel colors will be changed by the writing/reading.
+ */
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+
+public class Write3ByteBgrTest {
+    private static int width = 100;
+    private static int height = 100;
+    private static Color color = new Color(0x10, 0x20, 0x30);
+
+    static int bufferedImageType[] = {
+        BufferedImage.TYPE_CUSTOM,
+        BufferedImage.TYPE_BYTE_BINARY,
+        BufferedImage.TYPE_3BYTE_BGR
+    };
+
+    static String bufferedImageStringType[] = {
+        "BufferedImage.TYPE_CUSTOM: test for BandedSampleModel",
+        "BufferedImage.TYPE_BYTE_BINARY",
+        "BufferedImage.TYPE_3BYTE_BGR"
+    };
+
+    private static String writingFormat = "BMP";
+    private static ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(writingFormat).next();
+    private int type;
+
+    public static void main(String[] args) {
+
+        //int i = 0;
+        for(int i=0; i<bufferedImageType.length; i++) {
+            Write3ByteBgrTest t1 = new Write3ByteBgrTest(bufferedImageType[i]);
+
+            System.out.println("\n\nImage test for type " + bufferedImageStringType[i]);
+            t1.doImageTest();
+        }
+    }
+
+    private Write3ByteBgrTest(int type) {
+        this.type = type;
+    }
+
+    private void doImageTest() {
+        try {
+            BufferedImage src = createTestImage(type);
+            BufferedImage dst = writeImage(src);
+
+            compareImages(src, dst);
+        } catch (ArrayIndexOutOfBoundsException e) {
+            throw new RuntimeException("Test failed: index out of array bounds!");
+        }
+    }
+
+
+    private void compareImages(BufferedImage src, BufferedImage dst) {
+        Object dstPixel = dst.getRaster().getDataElements(width/2, height/2, null);
+        Object srcPixel = src.getRaster().getDataElements(width/2, height/2, null);
+
+        if ( (src.getColorModel().getRed(srcPixel) != dst.getColorModel().getRed(dstPixel)) ||
+             (src.getColorModel().getGreen(srcPixel) != dst.getColorModel().getGreen(dstPixel)) ||
+             (src.getColorModel().getBlue(srcPixel) != dst.getColorModel().getBlue(dstPixel)) ||
+             (src.getColorModel().getAlpha(srcPixel) != dst.getColorModel().getAlpha(dstPixel)) ) {
+
+            showPixel(src, width/2, height/2);
+            showPixel(dst, width/2, height/2);
+
+            showRes(dst, src);
+            throw new RuntimeException(
+                "Colors are different: " +
+                Integer.toHexString(src.getColorModel().getRGB(srcPixel)) + " and " +
+                Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+        }
+    }
+
+    private BufferedImage writeImage(BufferedImage src) {
+        try {
+            BufferedImage dst = null;
+            if (!writer.getOriginatingProvider().canEncodeImage(src)) {
+                throw new RuntimeException(writingFormat+" writer does not support the image type "+type);
+            }
+            System.out.println(writingFormat+" writer claims it can encode the image "+type);
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+            writer.setOutput(ios);
+            IIOImage img = new IIOImage(src.getRaster(), null, null);
+            writer.write(img);
+            ios.close();
+            baos.close();
+
+            // save to file
+            File f = new File("test"+src.getType()+".bmp");
+            FileOutputStream fos = new FileOutputStream(f);
+            fos.write(baos.toByteArray());
+            fos.close();
+
+
+            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+            dst = ImageIO.read(bais);
+            return dst;
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static void showPixel(BufferedImage src, int x, int y) {
+        System.out.println("Img is " + src);
+        Object p = src.getRaster().getDataElements(x, y, null);
+        System.out.println("RGB:   " +
+                           Integer.toHexString(src.getColorModel().getRGB(p)));
+        System.out.println("Red:   " +
+                           Integer.toHexString(src.getColorModel().getRed(p)));
+        System.out.println("Green: " +
+                           Integer.toHexString(src.getColorModel().getGreen(p)));
+        System.out.println("Blue:  " +
+                           Integer.toHexString(src.getColorModel().getBlue(p)));
+        System.out.println("Alpha: " +
+                           Integer.toHexString(src.getColorModel().getAlpha(p)));
+    }
+
+    private static BufferedImage createTestImage(int type) {
+        return createTestImage(type, color);
+    }
+
+    private static BufferedImage createTestImage(int type, Color c) {
+        BufferedImage i = null;
+        if (type == BufferedImage.TYPE_CUSTOM) {
+            WritableRaster wr = Raster.createBandedRaster(
+                DataBuffer.TYPE_BYTE,
+                width, height,
+                width,               // scanlineStride
+                new int[] { 0, 1, 2},// bankIndices[],
+                new int[] { 1, 2, 0},// bankOffsets[],
+                null);
+
+            ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+
+            ColorModel cm = new ComponentColorModel(cs,
+                                                    new int[] { 8, 8, 8},
+                                                    false,
+                                                    false,
+                                                    ColorModel.OPAQUE,
+                                                    DataBuffer.TYPE_BYTE);
+            i = new BufferedImage(cm, wr, false, null);
+        } else {
+            i = new BufferedImage(width, height, type);
+        }
+
+        Graphics2D g = i.createGraphics();
+
+        g.setColor(c);
+        g.fillRect(0, 0, width, height);
+        g.setColor(Color.white);
+        g.drawRect(10,10, width-20, height-20);
+
+        return i;
+    }
+
+    private static void showRes(final BufferedImage src,
+                                final BufferedImage dst)
+        {
+        final int w = src.getWidth()+  dst.getWidth();
+        final int h = Math.max(src.getHeight(), dst.getHeight());
+
+        JFrame f = new JFrame("Test results");
+        f.getContentPane().add( new JComponent() {
+                public Dimension getPreferredSize() {
+                    return new Dimension(w,h);
+                }
+
+                public void paintComponent(Graphics g) {
+                    g.drawImage(src,0,0, null);
+                    g.drawImage(dst, src.getWidth(),0, null);
+                }
+            });
+        f.pack();
+        f.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/WriteProgressListenerTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4897067 4920152
+ * @summary Tests that IIOWriteProgressListener receives correct progress
+ *          percentage. Also it tests problem described in 4920152: test fails
+ *          if imageComplete() or imageStarted() was called twice.
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOWriteProgressListener;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteProgressListenerTest {
+
+
+    protected static String format = "BMP";
+
+        protected String compression_type;
+        protected WriteProgressListener listener;
+
+        public WriteProgressListenerTest(String compression_type) {
+        this.compression_type = compression_type;
+        listener = new WriteProgressListener();
+    }
+
+    public void doTest() {
+        try {
+            System.out.println("Progress test for " + compression_type);
+            BufferedImage bi = new BufferedImage(20, 300, BufferedImage.TYPE_INT_RGB);
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+
+            Iterator iter = ImageIO.getImageWritersByFormatName(format);
+            if (!iter.hasNext()) {
+                throw new RuntimeException("No available writer for " + format);
+            }
+            ImageWriter writer = (ImageWriter)iter.next();
+
+            writer.setOutput(ios);
+            writer.addIIOWriteProgressListener(listener);
+
+            IIOImage iio_img = new IIOImage(bi, null, null);
+
+            ImageWriteParam param = writer.getDefaultWriteParam();
+
+            param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+            param.setCompressionType(compression_type);
+
+
+            writer.write(null, iio_img, param);
+
+            if (!listener.isTestPassed) {
+                throw new RuntimeException("Test for " + compression_type + " does not finish correctly!");
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+        public static void main(String args[]) {
+        String[] compression_types = new String[] { "BI_RGB",
+                                                    "BI_JPEG",
+                                                    "BI_PNG"};
+
+        for(int i=0; i<compression_types.length; i++) {
+            WriteProgressListenerTest test = new
+                WriteProgressListenerTest(compression_types[i]);
+            test.doTest();
+        }
+        }
+
+    static class WriteProgressListener implements IIOWriteProgressListener {
+        List progress;
+        public boolean isTestPassed = false;
+        private boolean isImageStarted = false;
+        private boolean isImageComplete = false;
+
+        public WriteProgressListener() {
+            progress = new ArrayList();
+        }
+
+        public void imageComplete(ImageWriter source) {
+            System.out.println("Image Completed");
+            if (!isImageComplete) {
+                isImageComplete = true;
+            } else {
+                throw new RuntimeException("The imageComplete() was called twice."
+                                           + " Test failed.");
+            }
+
+            checkProgress();
+        }
+        public void imageProgress(ImageWriter source, float percentageDone) {
+            System.out.println("Image Progress "+percentageDone);
+            progress.add(new Float(percentageDone));
+        }
+
+        public void imageStarted(ImageWriter source, int imageIndex) {
+            System.out.println("Image Started "+imageIndex);
+            if (!isImageStarted) {
+                isImageStarted = true;
+            } else {
+                throw new RuntimeException("The imageStarted() was called twice. "
+                                           + " Test failed.");
+            }
+            progress.clear();
+        }
+
+        public void thumbnailComplete(ImageWriter source)  {
+            System.out.println("Thubnail completed");
+        }
+
+        public void thumbnailProgress(ImageWriter source, float percentageDone) {
+            System.out.println("Thubnail Progress " + percentageDone);
+        }
+
+        public void thumbnailStarted(ImageWriter source, int imageIndex, int thumbnailIndex) {
+            System.out.println("Thubnail started " + imageIndex);
+        }
+
+        public void writeAborted(ImageWriter source) {
+            System.out.println("Writing Aborted");
+            checkProgress();
+        }
+
+        private void checkProgress() {
+            Iterator i = progress.iterator();
+            if (!i.hasNext()) {
+                throw new RuntimeException("progress values list is empty!");
+            }
+            float val = ((Float)i.next()).floatValue();
+            while(i.hasNext()) {
+                float next = ((Float)i.next()).floatValue();
+                if (val >= next) {
+                    throw new RuntimeException("progress values do not increase!");
+                }
+                val = next;
+            }
+            isTestPassed = true;
+            System.out.println("Test passed.");
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/bmp/WritingColorChangeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4892214
+ * @summary Test checks that colors are not changed by the writing/reading in
+ *          the BMP format for TYPE_INT_BGR and TYPE_USHORT_555_RGB buffered
+ *          images
+ */
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+
+public class WritingColorChangeTest {
+    private static int width = 100;
+    private static int height = 100;
+    private static Color color = new Color(0x10, 0x20, 0x30);
+
+    static int bufferedImageType[] = {
+        BufferedImage.TYPE_USHORT_565_RGB,
+        BufferedImage.TYPE_INT_BGR,
+        BufferedImage.TYPE_INT_RGB,
+        BufferedImage.TYPE_USHORT_555_RGB,
+    };
+
+    static String bufferedImageStringType[] = {
+        "BufferedImage.TYPE_USHORT_565_RGB",
+        "BufferedImage.TYPE_INT_BGR",
+        "BufferedImage.TYPE_INT_RGB",
+        "BufferedImage.TYPE_USHORT_555_RGB",
+    };
+    private static String writingFormat = "BMP";
+    private static ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName(writingFormat).next();
+    private int type;
+
+    public static void main(String[] args) {
+
+        //int i = 7; //3; //7;
+        for(int i=0; i<bufferedImageType.length; i++) {
+            System.out.println("\n\nTest for type " + bufferedImageStringType[i]);
+
+            WritingColorChangeTest t1 = new WritingColorChangeTest(bufferedImageType[i]);
+            t1.doTest();
+
+        }
+    }
+
+    private WritingColorChangeTest(int type) {
+        this.type = type;
+    }
+
+    private void doTest() {
+        BufferedImage src = createTestImage(type);
+        System.out.println("Sample model is " + src.getSampleModel());
+
+        BufferedImage dst = doModification(src);
+
+        Object dstPixel = dst.getRaster().getDataElements(width/2, height/2, null);
+        Object srcPixel = src.getRaster().getDataElements(width/2, height/2, null);
+
+        if (src.getType() == BufferedImage.TYPE_USHORT_555_RGB ||
+            src.getType() == BufferedImage.TYPE_USHORT_565_RGB ) {
+
+            Color cmpColor = new Color(dst.getColorModel().getRed(dstPixel),
+                                       dst.getColorModel().getGreen(dstPixel),
+                                       dst.getColorModel().getBlue(dstPixel));
+            BufferedImage cmp = createTestImage(src.getType(), cmpColor);
+
+            Object cmpPixel = cmp.getRaster().getDataElements(width/2, height/2, null);
+
+            dst = cmp;
+            dstPixel = cmpPixel;
+        }
+
+        if ( (src.getColorModel().getRed(srcPixel) != dst.getColorModel().getRed(dstPixel)) ||
+             (src.getColorModel().getGreen(srcPixel) != dst.getColorModel().getGreen(dstPixel)) ||
+             (src.getColorModel().getBlue(srcPixel) != dst.getColorModel().getBlue(dstPixel)) ||
+             (src.getColorModel().getAlpha(srcPixel) != dst.getColorModel().getAlpha(dstPixel)) ) {
+
+            showPixel(src, width/2, height/2);
+            showPixel(dst, width/2, height/2);
+
+            showRes(dst, src);
+            throw new RuntimeException(
+                "Colors are different: " +
+                Integer.toHexString(src.getColorModel().getRGB(srcPixel)) + " and " +
+                Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+        }
+    }
+
+    private BufferedImage doModification(BufferedImage src) {
+        try {
+            BufferedImage dst = null;
+            if (!writer.getOriginatingProvider().canEncodeImage(src)) {
+                throw new RuntimeException(writingFormat+" writer does not support the image type "+type);
+            }
+            System.out.println(writingFormat+" writer claims it can encode the image "+type);
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+            writer.setOutput(ios);
+            writer.write(src);
+            ios.close();
+            baos.close();
+
+            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+            dst = ImageIO.read(bais);
+            return dst;
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static void showPixel(BufferedImage src, int x, int y) {
+        System.out.println("Img is " + src);
+        Object p = src.getRaster().getDataElements(x, y, null);
+        System.out.println("RGB:   " +
+                           Integer.toHexString(src.getColorModel().getRGB(p)));
+        System.out.println("Red:   " +
+                           Integer.toHexString(src.getColorModel().getRed(p)));
+        System.out.println("Green: " +
+                           Integer.toHexString(src.getColorModel().getGreen(p)));
+        System.out.println("Blue:  " +
+                           Integer.toHexString(src.getColorModel().getBlue(p)));
+        System.out.println("Alpha: " +
+                           Integer.toHexString(src.getColorModel().getAlpha(p)));
+    }
+
+    private static BufferedImage createTestImage(int type) {
+        return createTestImage(type, color);
+    }
+
+    private static BufferedImage createTestImage(int type, Color c) {
+        BufferedImage i = new BufferedImage(width, height,
+                                            type);
+        Graphics2D g = i.createGraphics();
+
+        g.setColor(c);
+        g.fillRect(0, 0, width, height);
+
+        return i;
+    }
+
+    private static void showRes(final BufferedImage src, final BufferedImage dst) {
+        final int w = src.getWidth()+  dst.getWidth();
+        final int h = Math.max(src.getHeight(), dst.getHeight());
+
+        JFrame f = new JFrame("Test results");
+        f.getContentPane().add( new JComponent() {
+                public Dimension getPreferredSize() {
+                    return new Dimension(w,h);
+                }
+
+                public void paintComponent(Graphics g) {
+                    g.drawImage(src,0,0, null);
+                    g.drawImage(dst, src.getWidth(),0, null);
+                }
+            });
+        f.pack();
+        f.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/AnimationTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4339415
+ * @summary Tests that GIF writer plugin writes image sequences correctly
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class AnimationTest {
+
+    BufferedImage img = null;
+    int x, y;
+    int w, h;
+
+    protected static String fname = "animtest.gif";
+
+    public AnimationTest() {
+        w = h = 100;
+    }
+
+    private void initFrame() {
+        if (img != null) {
+            return;
+        }
+        byte r[] = new byte[256];
+        byte g[] = new byte[256];
+        byte b[] = new byte[256];
+
+        for (int i = 0; i < 256; i++) {
+            r[i] = g[i] = b[i] = (byte)0x00;
+        }
+        r[0] = (byte)0x00; g[0] = (byte)0x00; b[0] = (byte)0x00;
+        r[1] = (byte)0xFF; g[1] = (byte)0xFF; b[1] = (byte)0xFF;
+        r[2] = (byte)0xFF; g[3] = (byte)0xFF; b[4] = (byte)0xFF;
+
+        IndexColorModel icm = new IndexColorModel(8, 256,
+                                                  r, g, b);
+
+        img = new BufferedImage(w, h,
+                                BufferedImage.TYPE_BYTE_INDEXED,
+                                icm);
+    }
+
+    private BufferedImage createNextFrame() {
+        Graphics g = img.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0, 0, w, h);
+
+        g.setColor(Color.red);
+        g.drawLine(x, 0, x, h);
+
+        g.setColor(Color.blue);
+        g.drawLine(0, y, w, y);
+
+        x += 2;
+        y += 2;
+
+        x %= w;
+        y %= h;
+
+        return img;
+    }
+
+    ImageWriter writer = null;
+
+    private ImageWriter initWriter() throws IOException {
+        ImageOutputStream ios =
+            ImageIO.createImageOutputStream(new File(fname));
+        writer = ImageIO.getImageWritersByFormatName("GIF").next();
+
+        writer.setOutput(ios);
+
+        return writer;
+    }
+
+    public static void main(String[] args) {
+        try {
+            AnimationTest t = new AnimationTest();
+            t.initFrame();
+
+            ImageWriter w = t.initWriter();
+
+            ImageWriteParam p = w.getDefaultWriteParam();
+
+            IIOMetadata streamMetadata = w.getDefaultStreamMetadata(p);
+
+            w.prepareWriteSequence(streamMetadata);
+
+            for (int i = 0; i < 50; i++) {
+                BufferedImage f = t.createNextFrame();
+
+                ImageTypeSpecifier type = new ImageTypeSpecifier(f);
+
+                IIOMetadata m = w.getDefaultImageMetadata(type, p);
+
+                w.writeToSequence(new IIOImage(f, null, m), p);
+            }
+            w.endWriteSequence();
+
+            t.checkAnimation();
+        } catch (Exception e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+    }
+
+    protected void checkAnimation() throws IOException {
+        ImageReader r = ImageIO.getImageReadersByFormatName("GIF").next();
+        r.setInput(ImageIO.createImageInputStream(new File(fname)));
+
+        int n = r.getNumImages(true);
+        for (int i = 0; i < n; i++) {
+            BufferedImage f = r.read(i);
+            checkFrame(i, f);
+        }
+        System.out.println("Test passed.");
+    }
+
+    protected void checkFrame(int i, BufferedImage f) {
+        int x = 2 * i + 1;
+        for (int y = 0; y < h; y++) {
+            int argb = f.getRGB(x, y);
+            if (argb != 0xffffffff && !(argb == 0xff0000ff && y == 2 * i)) {
+                throw new RuntimeException("Test failed - bad frame");
+            }
+            argb = f.getRGB(y, x);
+            if (argb != 0xffffffff && !(argb == 0xffff0000 && y == 2 * i)) {
+                throw new RuntimeException("Test failed - bad frame");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/DisableCompressionTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6294683
+ * @summary Test verifies that GIF ImageWriteParam behaves according to spec
+ */
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+
+public class DisableCompressionTest {
+
+    public static void main(String[] args) {
+        testFormat("GIF");
+    }
+
+    protected static void testFormat(String format) {
+        ImageWriter writer = ImageIO.getImageWritersByFormatName(format).next();
+        if (writer == null) {
+            throw new RuntimeException("No writer for " + format);
+        }
+
+        ImageWriteParam param = writer.getDefaultWriteParam();
+        int[] supported_modes = new int[] {
+            ImageWriteParam.MODE_COPY_FROM_METADATA,
+                    ImageWriteParam.MODE_DEFAULT,
+                    ImageWriteParam.MODE_EXPLICIT };
+
+        for (int mode : supported_modes) {
+            String mode_name = getModeName(mode);
+            System.out.println("Test mode " + mode_name + "...");
+            // we know that GIF image writer supports compression
+            // and supports any compression mode form supportd_modes
+            // If exception would be thrown here then test failed.
+            param.setCompressionMode(mode);
+
+            // now we are trying to disable compression.
+            // This operation is not supported because GIF image writer
+            // does not provide uncompressed output.
+            // The expected behaviour is that UnsupportedOperationException
+            // will be thrown here and current compression mode will not be
+            // changed.
+            boolean gotException = false;
+            try {
+                param.setCompressionMode(ImageWriteParam.MODE_DISABLED);
+            } catch (UnsupportedOperationException e) {
+                gotException = true;
+            } catch (Throwable e) {
+                throw new RuntimeException("Test failed due to unexpected exception", e);
+            }
+
+            if (!gotException) {
+                throw new RuntimeException("Test failed.");
+            }
+
+            if (param.getCompressionMode() != mode) {
+                throw new RuntimeException("Param state was changed.");
+            }
+            System.out.println("Test passed.");
+        }
+    }
+
+    private static String getModeName(int mode) {
+        switch(mode) {
+            case ImageWriteParam.MODE_COPY_FROM_METADATA:
+                return "MODE_COPY_FROM_METADATA";
+            case ImageWriteParam.MODE_DEFAULT:
+                return "MODE_DEFAULT";
+            case ImageWriteParam.MODE_DISABLED:
+                return "MODE_DISABLED";
+            case ImageWriteParam.MODE_EXPLICIT:
+                return "MODE_EXPLICIT";
+            default:
+                throw new IllegalArgumentException("Unknown mode: " + mode);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/EndWriteSequenceTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6275366 6275369
+ * @summary Verifies that behaviour of GIFImageWriter.endWriteSequence() is
+ *          consistent with specification
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class EndWriteSequenceTest {
+    public static void main(String[] args) throws IOException {
+        ImageWriter w =
+            ImageIO.getImageWritersByFormatName("GIF").next();
+
+        boolean gotCorrectException = false;
+
+        /**
+         * check statement: "Throws: IllegalStateException -
+         * if the output has not been set ...."
+         */
+        try {
+            w.reset(); // to be shure that output is null
+            w.endWriteSequence();
+        } catch (IllegalStateException e) {
+            gotCorrectException = true;
+        } catch (Throwable e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+        if (!gotCorrectException) {
+            throw new RuntimeException("Test failed.");
+        }
+
+        /**
+         * set up output stream
+         */
+        ByteArrayOutputStream baos =
+            new ByteArrayOutputStream();
+
+        ImageOutputStream ios =
+            ImageIO.createImageOutputStream(baos);
+
+        w.setOutput(ios);
+
+        /**
+         * check statement: "Throws: IllegalStateException -
+         * if .... prepareWriteSequence has not been called.
+         */
+        gotCorrectException = false;
+        try {
+            w.endWriteSequence();
+        } catch  (IllegalStateException e) {
+            gotCorrectException = true;
+        } catch (Throwable e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+        if (!gotCorrectException) {
+            throw new RuntimeException("Test failed.");
+        }
+
+        System.out.println("Test passed.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/IndexingTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4339415
+ * @summary Tests that GIF writer plugin is able to write non-index images
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Transparency;
+import java.awt.color.ColorSpace;
+import java.awt.image.BufferedImage;
+import java.awt.image.ComponentColorModel;
+import java.awt.image.DataBuffer;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.util.Random;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+
+public class IndexingTest {
+
+    protected static final String fname = "itest.gif";
+
+    int w;
+    int h;
+
+    Random rnd;
+
+    public IndexingTest() {
+        w = h  = 200;
+        rnd = new Random();
+    }
+
+    public void doTest() {
+        ComponentColorModel ccm = createBitmaskColorModel();
+        BufferedImage img = createComponentImage(w, h, ccm);
+
+        try {
+            ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next();
+            w.setOutput(ImageIO.createImageOutputStream(new File(fname)));
+            w.write(img);
+        } catch (Exception e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+
+        BufferedImage dst = null;
+        try {
+            dst = ImageIO.read(new File(fname));
+        } catch (Exception e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+
+        compareImages(img, dst);
+
+        System.out.println("Test passed.");
+    }
+
+    protected static ComponentColorModel createBitmaskColorModel() {
+        ComponentColorModel cm =
+            new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB),
+                                    true, false, Transparency.BITMASK,
+                                    DataBuffer.TYPE_BYTE);
+        return cm;
+    }
+
+    protected static BufferedImage createComponentImage(int w, int h,
+                                                        ComponentColorModel cm)
+    {
+        WritableRaster wr = cm.createCompatibleWritableRaster(w, h);
+
+        BufferedImage img = new BufferedImage(cm, wr, false, null);
+        Graphics2D g = img.createGraphics();
+        int width = w / 8;
+        Color[] colors = new Color[8];
+        colors[0] = Color.red;
+        colors[1] = Color.green;
+        colors[2] = Color.blue;
+        colors[3] = Color.white;
+        colors[4] = Color.black;
+        colors[5] = new Color(0x80, 0x80, 0x80, 0x00);
+        colors[6] = Color.yellow;
+        colors[7] = Color.cyan;
+
+        for (int i = 0; i < 8; i++) {
+            g.setColor(colors[i]);
+            g.fillRect(i * width, 0, width, h);
+        }
+        return img;
+    }
+
+    protected void compareImages(BufferedImage src, BufferedImage dst) {
+        int n = 10;
+        while (n-- > 0) {
+            int x = rnd.nextInt(w);
+            int y = rnd.nextInt(h);
+
+            int pSrc = src.getRGB(x, y);
+            int pDst = src.getRGB(x, y);
+
+            if (pSrc != pDst) {
+                throw new RuntimeException("Images are different");
+            }
+        }
+    }
+
+    public static void main(String[] args) {
+        IndexingTest t = new IndexingTest();
+        t.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/LogicalScreenDimensionTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6307618
+ * @summary Test verifies that GIF image writer updates the dimension of the
+ *          logical screen according to image dimension
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.imageio.plugins.gif.GIFStreamMetadata;
+
+public class LogicalScreenDimensionTest {
+    public static void main(String[] args) throws IOException {
+        String format = "GIF";
+        ImageWriter writer =
+                ImageIO.getImageWritersByFormatName(format).next();
+        if (writer == null) {
+            throw new RuntimeException("No available writers for " + format);
+        }
+
+        BufferedImage img = createTestImage(100, 100, BufferedImage.TYPE_BYTE_GRAY);
+
+        ImageWriteParam p = writer.getDefaultWriteParam();
+        ImageTypeSpecifier type =
+            ImageTypeSpecifier.createFromRenderedImage(img);
+        IIOMetadata inImageMetadata =
+            writer.getDefaultImageMetadata(type, p);
+
+        IIOMetadata inStreamMetadata = writer.getDefaultStreamMetadata(p);
+
+        // write and read image
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        writer.setOutput(ios);
+
+        writer.write(inStreamMetadata, new IIOImage(img, null, inImageMetadata), p);
+
+        ios.flush();
+        ios.close();
+
+        // read result
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ImageInputStream iis = ImageIO.createImageInputStream(bais);
+        ImageReader reader = ImageIO.getImageReader(writer);
+        reader.setInput(iis);
+
+        IIOMetadata outStreamMetadata = reader.getStreamMetadata();
+
+        GIFStreamMetadata gifStreamMetadata = (GIFStreamMetadata)outStreamMetadata;
+
+        if (gifStreamMetadata.logicalScreenWidth != img.getWidth() ||
+                gifStreamMetadata.logicalScreenHeight != img.getHeight()) {
+            throw new RuntimeException("Test failed due to wrong logical screen dimension.");
+        }
+    }
+
+    private static BufferedImage createTestImage(int w, int h, int type) {
+        BufferedImage res = new BufferedImage(w, h, type);
+        Graphics2D g = res.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0, 0, w, h);
+        g.setColor(Color.black);
+        g.fillRect(w/4, h/4, w/2, h/2);
+
+
+        return res;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/OddPaletteTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6275211 6276621
+ * @summary Tests that GIF writer plugin is able to write indexed images if
+ *          palette size is not a power of two
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class OddPaletteTest {
+
+    private static int w = 100;
+    private static int h = 100;
+
+    public static void main(String[] args) {
+        BufferedImage[] srcs = new BufferedImage[2];
+        srcs[0] = createTestImage(7); // bug 6275211
+        srcs[1] = createTestImage(1); // bug 6276621
+
+        for (int i = 0; i < srcs.length; i++) {
+            doTest(srcs[i]);
+        }
+    }
+
+    private static void doTest(BufferedImage src) {
+        ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next();
+        if (w == null) {
+            throw new RuntimeException("No writer available!");
+        }
+
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+            w.setOutput(ios);
+            w.write(src);
+        } catch (IOException e) {
+            throw new RuntimeException("Test failed.", e);
+        } catch (IllegalArgumentException e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+    }
+
+    private static BufferedImage createTestImage(int paletteSize) {
+        byte[] r = new byte[paletteSize];
+        byte[] g = new byte[paletteSize];
+        byte[] b = new byte[paletteSize];
+
+        int shift = 256 / paletteSize;
+        for (int i = 0; i < paletteSize; i++) {
+            r[i] = g[i] = b[i] = (byte)(shift * i);
+        }
+
+        int numBits = getNumBits(paletteSize);
+
+        System.out.println("num of bits " + numBits);
+
+        IndexColorModel icm =
+            new IndexColorModel(numBits, paletteSize,  r, g, b);
+
+        BufferedImage img = new BufferedImage(w, h,
+                                              BufferedImage.TYPE_BYTE_INDEXED,
+                                              icm);
+        Graphics2D  g2d = img.createGraphics();
+        g2d.setColor(Color.white);
+        g2d.fillRect(0, 0, w, h);
+        g2d.setColor(Color.black);
+        g2d.drawLine(0, 0, w, h);
+        g2d.drawLine(0, h, w, 0);
+
+        return img;
+    }
+
+    private static int getNumBits(int paletteSize) {
+        if (paletteSize < 0) {
+            throw new IllegalArgumentException("negative palette size: " +
+                                               paletteSize);
+        }
+        if (paletteSize < 2) {
+            return 1;
+        }
+        int numBits = 0;
+
+        paletteSize--;
+
+        while (paletteSize > 0) {
+            numBits++;
+            paletteSize = paletteSize >> 1;
+        }
+        return numBits;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/PrepareWriteSequenceTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6284538
+ * @summary Test verifies whether IllegalStateException is thrown if the output
+ *          stream have not set to the GIF image writer instance
+ */
+
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+public class PrepareWriteSequenceTest {
+    public static void main(String[] args) throws IOException {
+        String format = "GIF";
+        ImageWriter writer = ImageIO.getImageWritersByFormatName(format).next();
+
+        ImageWriteParam param = writer.getDefaultWriteParam();
+
+        IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(param);
+
+        boolean gotException = false;
+        try {
+            writer.prepareWriteSequence(streamMetadata);
+        } catch (IllegalStateException e) {
+            gotException = true;
+            System.out.println("Test passed.");
+            e.printStackTrace(System.out);
+        }
+
+        if (!gotException) {
+            throw new RuntimeException("Test failed.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/RGBAnimationTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6324581
+ * @summary Test verifies that RGB images are written to animated GIF image use
+ *          local color table if image palette is not equals to the global color
+ *          table
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.imageio.plugins.gif.GIFImageMetadata;
+
+public class RGBAnimationTest {
+    protected static String format = "GIF";
+    protected static boolean doSave = true;
+
+    Frame[] frames;
+    ImageWriter writer;
+    ImageReader reader;
+
+    public static void main(String[] args) throws IOException  {
+        RGBAnimationTest test = new RGBAnimationTest();
+        test.doTest();
+    }
+    /** Creates a new instance of RGBAnimationTest */
+    public RGBAnimationTest() {
+        frames = new Frame[4];
+
+
+        frames[0] = new Frame(new Color[] {Color.red, Color.green});
+        frames[1] = new Frame(new Color[] {Color.green, Color.cyan});
+        frames[2] = new Frame(new Color[] {Color.cyan, Color.yellow});
+        frames[3] = new Frame(new Color[] {Color.yellow, Color.red});
+
+        writer = ImageIO.getImageWritersByFormatName(format).next();
+        reader = ImageIO.getImageReadersByFormatName(format).next();
+    }
+
+    public void doTest() throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        writer.reset();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        writer.setOutput(ios);
+
+        ImageWriteParam wparam = prepareWriteParam();
+
+        IIOMetadata streamMetadata = prepareStreamMetadata(wparam);
+
+        writer.prepareWriteSequence(streamMetadata);
+
+        for (int i = 0; i < frames.length; i++) {
+            BufferedImage src = frames[i].getImage();
+            IIOMetadata imageMetadata = prepareImageMetadata(i, src, wparam);
+            IIOImage img = new IIOImage(src,  null, imageMetadata);
+
+            writer.writeToSequence(img, wparam);
+        }
+        writer.endWriteSequence();
+        ios.flush();
+        ios.close();
+
+        if (doSave) {
+            File f = File.createTempFile("wr_test_", "." + format, new File("."));
+            System.out.println("Save to file: " + f.getCanonicalPath());
+            FileOutputStream fos = new FileOutputStream(f);
+            fos.write(baos.toByteArray());
+            fos.flush();
+            fos.close();
+        }
+        // read result
+        reader.reset();
+        ByteArrayInputStream bais =
+                new ByteArrayInputStream(baos.toByteArray());
+        reader.setInput(ImageIO.createImageInputStream(bais));
+
+        int minIndex = reader.getMinIndex();
+        int numImages = reader.getNumImages(true);
+
+        for (int i = 0; i < numImages; i++) {
+            BufferedImage dst = reader.read(i + minIndex);
+            frames[i].checkResult(dst);
+        }
+    }
+
+    protected IIOMetadata prepareImageMetadata(int i, BufferedImage img, ImageWriteParam wparam) {
+        GIFImageMetadata idata = (GIFImageMetadata)
+        writer.getDefaultImageMetadata(ImageTypeSpecifier.createFromRenderedImage(img), wparam);
+
+        idata.delayTime = 100;
+        idata.disposalMethod = 0;
+        idata.transparentColorFlag = false;
+
+        if (i == 0) {
+            ArrayList<byte[]> appIDs = new ArrayList<byte[]>();
+            appIDs.add(new String("NETSCAPE").getBytes());
+            ArrayList<byte[]> authCodes = new ArrayList<byte[]>();
+            authCodes.add(new String("2.0").getBytes());
+            ArrayList<byte[]> appData = new ArrayList<byte[]>();
+            byte[] authData = {1, 0, 0};
+            appData.add(authData);
+
+            idata.applicationIDs = appIDs;
+            idata.authenticationCodes = authCodes;
+            idata.applicationData = appData;
+        }
+        return idata;
+    }
+
+    protected ImageWriteParam prepareWriteParam() {
+        return writer.getDefaultWriteParam();
+    }
+
+    protected IIOMetadata prepareStreamMetadata(ImageWriteParam wparam) {
+        return writer.getDefaultStreamMetadata(wparam);
+    }
+
+}
+
+class Frame {
+    protected static int type = BufferedImage.TYPE_INT_RGB;
+    protected static int dx = 100;
+    protected static int h = 100;
+
+    protected Color[] colors;
+    protected BufferedImage img;
+
+    public Frame(Color[] colors) {
+        this.colors = colors;
+        img = null;
+    }
+
+    public BufferedImage getImage() {
+        if (img == null) {
+            img = new BufferedImage(dx * colors.length, h, type);
+            Graphics2D g = img.createGraphics();
+            for (int i = 0; i < colors.length; i++) {
+                g.setColor(colors[i]);
+                g.fillRect(dx * i, 0, dx, h);
+            }
+        }
+        return img;
+    }
+
+    public void checkResult(BufferedImage dst) {
+        int y = h / 2;
+        int x = dx / 2;
+        for (int i = 0; i < colors.length; i++) {
+
+            int srcRgb = img.getRGB(i * dx + x, y);
+            int dstRgb = dst.getRGB(i * dx + x, y);
+
+            if (srcRgb != dstRgb) {
+                throw new RuntimeException("Test failed due to color difference: " +
+                        Integer.toHexString(dstRgb) + " instead of " +
+                        Integer.toHexString(srcRgb));
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/RGBImageTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6286578
+ * @summary Test verifies that RGB images does not convert to gray-scaled if
+ *          default image metadata is used
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class RGBImageTest {
+
+    Color[] usedColors = {
+        Color.red, Color.green, Color.blue, Color.yellow,
+        Color.cyan, Color.magenta, Color.white, Color.black };
+
+    BufferedImage src = null;
+    int dx= 20;
+    int height = 100;
+
+    protected BufferedImage getSrc() {
+        if (src == null) {
+            src = new BufferedImage(dx * usedColors.length, height,
+                                    BufferedImage.TYPE_INT_RGB);
+            Graphics g = src.createGraphics();
+            for (int i = 0; i < usedColors.length; i++) {
+                g.setColor(usedColors[i]);
+                g.fillRect(dx * i,  0, dx, height);
+            }
+        }
+        return src;
+    }
+
+    protected void doTest() throws IOException {
+        BufferedImage biSrc = getSrc();
+
+        ImageWriter writer = ImageIO.getImageWritersByFormatName("GIF").next();
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        writer.setOutput(ios);
+
+        ImageWriteParam writeParam = writer.getDefaultWriteParam();
+        IIOMetadata imageMetadata =
+            writer.getDefaultImageMetadata(new ImageTypeSpecifier(biSrc), writeParam);
+
+        IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(writeParam);
+
+        IIOImage iioImg = new IIOImage(biSrc, null, imageMetadata);
+        writer.write(streamMetadata, iioImg, writeParam);
+        ios.close();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+        ImageInputStream iis = ImageIO.createImageInputStream(bais);
+        ImageReader reader = ImageIO.getImageReader(writer);
+        reader.setInput(iis);
+        BufferedImage dst = reader.read(0);
+
+        // do test
+        int x = dx / 2;
+        int y = height / 2;
+
+        for (int i = 0; i < usedColors.length; i++) {
+            int dstRgb = dst.getRGB(x, y);
+            System.out.println("dstColor: " + Integer.toHexString(dstRgb));
+            int srcRgb = usedColors[i].getRGB();
+            System.out.println("srcColor: " + Integer.toHexString(srcRgb));
+            if (dstRgb != srcRgb) {
+                throw new RuntimeException("wrong color " + i + ": " + Integer.toHexString(dstRgb));
+            }
+            x += dx;
+        }
+
+    }
+
+    public static void main(String[] args) throws IOException {
+        RGBImageTest t = new RGBImageTest();
+        t.doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/StreamMetadataTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6319418
+ * @summary Test verifies that GIF stream metadata could be merged with tree
+ *          representation for all supported formats
+ */
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.w3c.dom.Node;
+
+public class StreamMetadataTest {
+    protected static final String format = "GIF";
+
+    ImageWriter writer = null;
+    IIOMetadata streamData = null;
+    ImageWriteParam wparam = null;
+    boolean doMerge = true;
+
+    public StreamMetadataTest() {
+        writer = ImageIO.getImageWritersByFormatName(format).next();
+        wparam = writer.getDefaultWriteParam();
+        streamData = writer.getDefaultStreamMetadata(wparam);
+    }
+
+    public void doTest() throws IIOInvalidTreeException {
+        if (streamData == null) {
+            throw new RuntimeException("No stream metadata available");
+        }
+
+        String[] formatNames = streamData.getMetadataFormatNames();
+        for(String fname : formatNames) {
+            System.out.println("Format name: " + fname);
+            Node root = streamData.getAsTree(fname);
+            if (streamData.isReadOnly()) {
+                throw new RuntimeException("Stream metadata is readonly!");
+            }
+            streamData.reset();
+            streamData.mergeTree(fname, root);
+        }
+    }
+
+    public static void main(String args[]) {
+        StreamMetadataTest test = new StreamMetadataTest();
+        try {
+            test.doTest();
+        } catch (Exception e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/TransparencyTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4339415
+ * @summary Tests that GIF writer plugin is able to write images with BITMASK
+ *          transparency
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+
+public class TransparencyTest {
+
+    protected static final String fname = "ttest.gif";
+    protected BufferedImage src;
+    protected BufferedImage dst;
+
+    public static void main(String[] args) {
+        System.out.println("Test indexed image...");
+        IndexColorModel icm = createIndexedBitmaskColorModel();
+        BufferedImage img = createIndexedImage(200, 200, icm);
+        TransparencyTest t = new TransparencyTest(img);
+
+        try {
+            t.doTest();
+        } catch (Exception e) {
+            throw new RuntimeException("Test failed!", e);
+        }
+        System.out.println("Test passed.");
+    }
+
+    protected TransparencyTest(BufferedImage src) {
+        this.src = src;
+    }
+
+    protected void doTest() throws IOException {
+        int w = src.getWidth();
+        int h = src.getHeight();
+
+        System.out.println("Write image...");
+        try {
+            ImageWriter writer =
+                ImageIO.getImageWritersByFormatName("GIF").next();
+            writer.setOutput(ImageIO.createImageOutputStream(new File(fname)));
+            writer.write(src);
+        } catch (Exception e) {
+            throw new RuntimeException("Test failed.", e);
+        }
+        System.out.println("Read image....");
+        dst = ImageIO.read(new File(fname));
+
+        BufferedImage tmp = new BufferedImage(w, 2 * h,
+                                              BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g = tmp.createGraphics();
+        g.setColor(Color.pink);
+        g.fillRect(0, 0, tmp.getWidth(), tmp.getHeight());
+
+        g.drawImage(src, 0, 0, null);
+        g.drawImage(dst, 0, h, null);
+
+        int width = w / 8;
+        int x = 5 * width + width / 2;
+        for (int y = 0; y < h; y++) {
+            int argb = tmp.getRGB(x, y);
+            if (Color.pink.getRGB() != argb) {
+                throw new RuntimeException("Bad color at " + x + "," + y +
+                                           " - " + Integer.toHexString(argb));
+            }
+        }
+    }
+
+    protected static BufferedImage createIndexedImage(int w, int h,
+                                                      IndexColorModel icm)
+    {
+        BufferedImage img = new BufferedImage(w, h,
+                                              BufferedImage.TYPE_BYTE_INDEXED,
+                                              icm);
+
+        int mapSize = icm.getMapSize();
+        int width = w / mapSize;
+
+        WritableRaster wr = img.getRaster();
+        for (int i = 0; i < mapSize; i++) {
+            for (int y = 0; y < h; y++) {
+                for (int x = 0; x < width; x++) {
+                    wr.setSample(i * width + x, y, 0, i);
+                }
+            }
+        }
+        return img;
+    }
+
+    protected  static IndexColorModel createIndexedBitmaskColorModel() {
+        int paletteSize = 8;
+        byte[] red = new byte[paletteSize];
+        byte[] green = new byte[paletteSize];
+        byte[] blue = new byte[paletteSize];
+
+        red[0] = (byte)0xff; green[0] = (byte)0x00; blue[0] = (byte)0x00;
+        red[1] = (byte)0x00; green[1] = (byte)0xff; blue[1] = (byte)0x00;
+        red[2] = (byte)0x00; green[2] = (byte)0x00; blue[2] = (byte)0xff;
+        red[3] = (byte)0xff; green[3] = (byte)0xff; blue[3] = (byte)0xff;
+        red[4] = (byte)0x00; green[4] = (byte)0x00; blue[4] = (byte)0x00;
+        red[5] = (byte)0x80; green[5] = (byte)0x80; blue[5] = (byte)0x80;
+        red[6] = (byte)0xff; green[6] = (byte)0xff; blue[6] = (byte)0x00;
+        red[7] = (byte)0x00; green[7] = (byte)0xff; blue[7] = (byte)0xff;
+
+        int numBits = 3;
+
+        IndexColorModel icm = new IndexColorModel(numBits, paletteSize,
+                                                  red, green, blue, 5);
+
+        return icm;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/UshortOutOfMemoryTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6294363
+ * @summary Test verifies that creation of tree representation of the native
+ *          image metadata for USHORT_GRAY images does not cause the
+ *          OutOfMemoryError
+ * @run main/othervm -Xms32M -Xmx32M UshortOutOfMemoryTest
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+public class UshortOutOfMemoryTest {
+    private int type;
+    private ImageWriter w;
+
+    public UshortOutOfMemoryTest(int type) {
+        this.type = type;
+        w = ImageIO.getImageWritersByFormatName("GIF").next();
+    }
+
+    public void testGetAsTree() {
+        ImageWriteParam p = w.getDefaultWriteParam();
+        IIOMetadata m =
+            w.getDefaultImageMetadata(ImageTypeSpecifier.createFromBufferedImageType(type), p);
+
+        String format = m.getNativeMetadataFormatName();
+        System.out.println("native format: " + format);
+
+        int count = 0;
+        try {
+            while (count < 100) {
+                System.out.println(" test " + count++);
+                m.getAsTree(format);
+            }
+        } catch (OutOfMemoryError e) {
+            System.gc();
+            throw new RuntimeException("Test failed. Number of performed operations: " + count, e);
+        }
+    }
+
+
+    public static void main(String[] args) throws IOException {
+        UshortOutOfMemoryTest t = new UshortOutOfMemoryTest(
+                BufferedImage.TYPE_USHORT_GRAY);
+        t.testGetAsTree();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/WriteMetadataTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6287880
+ * @summary Test verifies that default metadata for stream and image returned by
+ *          GIFImageWriter can be modified by the tree representation
+ */
+
+import java.awt.image.BufferedImage;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOInvalidTreeException;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.metadata.IIOMetadataNode;
+
+public class WriteMetadataTest {
+    private static String format = "GIF";
+
+    public static void main(String[] args) {
+        ImageWriter w = ImageIO.getImageWritersByFormatName(format).next();
+        if (w == null) {
+            throw new RuntimeException("No available writers for format " + format);
+        }
+        ImageWriteParam p = w.getDefaultWriteParam();
+
+        ImageTypeSpecifier t =
+                ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
+
+        IIOMetadata m = w.getDefaultImageMetadata(t, p);
+        System.out.println("Default image metadata is " + m);
+        testWritableMetadata(m);
+
+        IIOMetadata sm = w.getDefaultStreamMetadata(p);
+        System.out.println("Default stream metadata is " + sm);
+        testWritableMetadata(sm);
+    }
+
+    public static void testWritableMetadata(IIOMetadata m) {
+        String nativeFormatName =
+                m.getNativeMetadataFormatName();
+        System.out.println("Format: " + nativeFormatName);
+        IIOMetadataNode root = (IIOMetadataNode)m.getAsTree(nativeFormatName);
+        if (m.isReadOnly()) {
+            throw new RuntimeException("Metadata is read only!");
+        }
+        try {
+            m.setFromTree(nativeFormatName, root);
+        } catch (IIOInvalidTreeException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Test failed!", e);
+        } catch (IllegalStateException e) {
+            throw new RuntimeException("Test failed!", e);
+        }
+        System.out.println("Test passed.\n\n");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/WriterResetTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6275251
+ * @summary Verifies that GIF image writer throws IllegalStateException if
+ *          assigned output stream was cleared by reset() method
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriterResetTest {
+    public static void main(String[] args) throws IOException {
+        ImageWriter w = ImageIO.getImageWritersByFormatName("GIF").next();
+        if (w == null) {
+            throw new RuntimeException("No writers available!");
+        }
+
+        ByteArrayOutputStream baos =
+            new ByteArrayOutputStream();
+
+        ImageOutputStream ios =
+            ImageIO.createImageOutputStream(baos);
+
+        w.setOutput(ios);
+
+        BufferedImage img = createTestImage();
+
+        try {
+            w.reset();
+            w.write(img);
+        } catch (IllegalStateException e) {
+            System.out.println("Test passed");
+        } catch (Throwable e) {
+            throw new RuntimeException("Test failed", e);
+        }
+    }
+
+    private static BufferedImage createTestImage() {
+        BufferedImage img = new BufferedImage(100, 100,
+                                              BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = img.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0, 0, 100, 100);
+        g.setColor(Color.black);
+        g.fillRect(20, 20, 60, 60);
+
+        return img;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/gif/WriterReuseTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6283089
+ * @summary Test verifies that abort flag is cleared by the next write() call
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOWriteProgressListener;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriterReuseTest implements IIOWriteProgressListener {
+
+    boolean isFirst = true;
+    boolean isWritingCompleted = false;
+    boolean isWritingAborted = false;
+
+    public static void main(String[] args) throws IOException {
+        doTest(false);
+        doTest(true);
+    }
+
+    public static void doTest(boolean writeSequence) throws IOException {
+        String format = "GIF";
+        ImageWriter writer =
+                ImageIO.getImageWritersByFormatName(format).next();
+        if (writer == null) {
+            throw new RuntimeException("No writer available for " + format);
+        }
+
+        BufferedImage img = createTestImage();
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        writer.setOutput(ios);
+
+        WriterReuseTest t = new WriterReuseTest();
+        writer.addIIOWriteProgressListener(t);
+
+        ImageWriteParam param = writer.getDefaultWriteParam();
+        IIOMetadata streamMetadata = writer.getDefaultStreamMetadata(param);
+        IIOImage iioImg = new IIOImage(img, null, null);
+        if (writeSequence) {
+            writer.prepareWriteSequence(streamMetadata);
+            writer.writeToSequence(iioImg, param);
+        } else {
+            writer.write(img);
+        }
+
+        if (!t.isWritingAborted || t.isWritingCompleted) {
+            throw new RuntimeException("Test failed.");
+        }
+        t.reset();
+
+        // next attempt after abort
+        ImageOutputStream ios2 =
+             ImageIO.createImageOutputStream(new ByteArrayOutputStream());
+        writer.setOutput(ios2);
+        if (writeSequence) {
+            writer.writeToSequence(iioImg, param);
+        } else {
+            writer.write(img);
+        }
+
+        if (t.isWritingAborted || !t.isWritingCompleted) {
+            throw new RuntimeException("Test failed.");
+        }
+        System.out.println("Test passed.");
+    }
+
+    public static BufferedImage createTestImage() {
+        BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED);
+        Graphics g = img.createGraphics();
+        g.setColor(Color.black);
+        g.fillRect(0, 0, 100, 100);
+
+        g.setColor(Color.white);
+        g.fillRect(10, 10, 80, 80);
+
+        return img;
+    }
+
+    public WriterReuseTest() {
+        isFirst = true;
+        reset();
+    }
+
+    public void reset() {
+        isWritingAborted = false;
+        isWritingCompleted = false;
+    }
+
+    public void imageComplete(ImageWriter source) {
+        System.out.println("Image Completed");
+        this.isWritingCompleted = true;
+    }
+
+    public void imageProgress(ImageWriter source, float percentageDone) {
+        System.out.println("Image Progress "+percentageDone);
+        if (percentageDone > 50 && isFirst) {
+            isFirst = false;
+            source.abort();
+        }
+    }
+
+    public void imageStarted(ImageWriter source, int imageIndex) {
+        System.out.println("Image Started "+imageIndex);
+    }
+
+    public void thumbnailComplete(ImageWriter source)  {
+        System.out.println("Thubnail completed");
+    }
+
+    public void thumbnailProgress(ImageWriter source, float percentageDone) {
+        System.out.println("Thubnail Progress " + percentageDone);
+    }
+
+    public void thumbnailStarted(ImageWriter source, int imageIndex, int thumbnailIndex) {
+        System.out.println("Thubnail started " + imageIndex);
+    }
+
+    public void writeAborted(ImageWriter source) {
+        System.out.println("Writing Aborted");
+        this.isWritingAborted = true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/ByteBinaryTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4450894
+ * @summary Tests if the JPEG writer properly encodes IndexColorModel images
+ *          that contain less than 8-bit indices (such as TYPE_BYTE_BINARY)
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+public class ByteBinaryTest {
+
+    private static final int[] expectedVals =
+        { 0xffffffff, 0xff000000, 0xffffffff };
+
+    public static void main(String[] args) {
+        BufferedImage bi = new BufferedImage(100, 100,
+                                             BufferedImage.TYPE_BYTE_BINARY);
+
+        Graphics g = bi.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0, 0, 100, 100);
+        g.setColor(Color.black);
+        g.fillRect(20, 20, 40, 40);
+        g.setColor(Color.white);
+        g.fillRect(25, 25, 25, 25);
+        g.dispose();
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        boolean success;
+
+        try {
+            success = ImageIO.write(bi, "jpeg", baos);
+        } catch (IOException ioe) {
+            throw new RuntimeException("Could not write JPEG to stream");
+        }
+
+        if (!success) {
+            throw new RuntimeException("Could not find valid JPEG writer...");
+        }
+
+        byte[] bytearr = baos.toByteArray();
+        ByteArrayInputStream bais = new ByteArrayInputStream(bytearr);
+        BufferedImage bi2 = null;
+
+        try {
+            bi2 = ImageIO.read(bais);
+        } catch (IOException ioe) {
+            throw new RuntimeException("Could not read JPEG stream");
+        }
+
+        int[] actualVals = new int[3];
+
+        actualVals[0] = bi2.getRGB(27, 5);
+        actualVals[1] = bi2.getRGB(27, 22);
+        actualVals[2] = bi2.getRGB(35, 35);
+
+        for (int i = 0; i < actualVals.length; i++) {
+            if (actualVals[i] != expectedVals[i]) {
+                throw new RuntimeException("Pixel mismatch at index: " + i);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CanEncodeIndexed.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4528585
+ * @summary Tests whether the JPEGImageWriterSpi advertises that it is capable
+ *          of writing images using an IndexColorModel. The test fails if an
+ *          exception is thrown.
+ */
+
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+
+public class CanEncodeIndexed {
+
+    public static void main(String[] args) {
+        BufferedImage img = new BufferedImage(32, 32,
+                                              BufferedImage.TYPE_BYTE_INDEXED);
+
+        ImageTypeSpecifier spec =
+            ImageTypeSpecifier.createFromRenderedImage(img);
+
+        Iterator writers = ImageIO.getImageWriters(spec, "jpeg");
+
+        if (!writers.hasNext()) {
+            throw new RuntimeException("Test failed: " +
+                                       "no JPEG writer found for " +
+                                       "image with IndexColorModel");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CompressionBug.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4415068 4622201
+ * @summary Tests if the JPEG writer responds to the compression quality setting
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Random;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CompressionBug {
+
+    public CompressionBug() throws IOException {
+        File fileHighComp = File.createTempFile("CompressionHigh", ".jpg");
+        File fileLowComp = File.createTempFile("CompressionLow", ".jpg");
+
+        fileHighComp.deleteOnExit();
+        fileLowComp.deleteOnExit();
+
+        ImageOutputStream iosHighComp =
+            ImageIO.createImageOutputStream(fileHighComp);
+        ImageOutputStream iosLowComp =
+            ImageIO.createImageOutputStream(fileLowComp);
+
+        int width = 100;
+        int height = 100;
+        BufferedImage bi =
+            new BufferedImage(width, height,
+                              BufferedImage.TYPE_INT_RGB);
+        Graphics g = bi.createGraphics();
+        Random r = new Random();
+        for (int i = 0; i < 100; i++) {
+            Color c = new Color(r.nextInt(256),
+                                r.nextInt(256),
+                                r.nextInt(256));
+            int x = r.nextInt(width);
+            int y = r.nextInt(height);
+            int w = r.nextInt(width - x);
+            int h = r.nextInt(height - y);
+            g.setColor(c);
+            g.fillRect(x, y, w, h);
+        }
+
+        ImageTypeSpecifier typeSpecifier =
+            new ImageTypeSpecifier(bi.getColorModel(),
+                                   bi.getSampleModel());
+
+        ImageWriter writer = null;
+        Iterator iter = ImageIO.getImageWriters(typeSpecifier,"jpeg");
+        while (iter.hasNext()) {
+            writer = (ImageWriter)iter.next();
+            break;
+        }
+
+        IIOImage iioImg = new IIOImage(bi, null, null);
+        ImageWriteParam wParam = writer.getDefaultWriteParam();
+        wParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+
+        // write the highly compressed image (a compression quality setting of
+        // 0.1f means low visual quality and small file size)
+        wParam.setCompressionQuality(0.1f);
+        writer.setOutput(iosHighComp);
+        writer.write(null, iioImg, wParam);
+
+        // write the somewhat compressed image (a compression quality setting
+        // of 0.9f means high visual quality and large file size)
+        wParam.setCompressionQuality(0.9f);
+        writer.setOutput(iosLowComp);
+        writer.write(null, iioImg, wParam);
+
+        long sizeOfFileLowComp = fileLowComp.length();
+        long sizeOfFileHighComp = fileHighComp.length();
+
+        // the highly compressed image file should have a smaller file size
+        // than the image file with low compression; throw an exception if
+        // this isn't the case
+        if (sizeOfFileLowComp < sizeOfFileHighComp) {
+            throw new RuntimeException("Lower compression quality did not " +
+                                       "reduce file size!");
+        }
+    }
+
+    public static void main(String args[]) throws IOException {
+        new CompressionBug();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CompressionVals.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4972087
+ * @summary Verifies that JPEGImageWriteParam.getCompressionQualityValues()
+ *          returns an array that is one longer than the one returned by
+ *          getCompressionQualityDescriptions()
+ */
+
+import javax.imageio.ImageWriteParam;
+import javax.imageio.plugins.jpeg.JPEGImageWriteParam;
+
+public class CompressionVals {
+
+    public static void main(String[] args) {
+        ImageWriteParam iwp = new JPEGImageWriteParam(null);
+        iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+        float[] vals = iwp.getCompressionQualityValues();
+        String[] descs = iwp.getCompressionQualityDescriptions();
+        if (vals.length != (descs.length + 1)) {
+            throw new RuntimeException("Test failed: Values array is not " +
+                                       "one larger than descriptions array");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/CrashAfterDispose.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4660047
+ * @summary Tests if the JPEG reader/writer crashes the VM if certain methods
+ *          are called after a call to dispose()
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CrashAfterDispose {
+
+    public static void main(String[] args) throws IOException {
+        InputStream bais = new ByteArrayInputStream(new byte[100]);
+        ImageInputStream iis = ImageIO.createImageInputStream(bais);
+
+        // find the JPEG reader
+        ImageReader reader = null;
+        Iterator readers = ImageIO.getImageReadersByFormatName("jpeg");
+        if (readers.hasNext()) {
+            reader = (ImageReader)readers.next();
+        } else {
+            throw new RuntimeException("Unable to find a reader!");
+        }
+
+        // dispose the reader, then poke and prod it... the reader should
+        // throw exceptions (which will be caught by this test), but it
+        // should not crash the VM
+        reader.dispose();
+
+        try {
+            reader.setInput(iis);
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            reader.read(0);
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            reader.abort();
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            reader.reset();
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            reader.dispose();
+        } catch (IllegalStateException e) {
+        }
+
+        // find the JPEG writer
+        ImageWriter writer = null;
+        Iterator writers = ImageIO.getImageWritersByFormatName("jpeg");
+        if (writers.hasNext()) {
+            writer = (ImageWriter)writers.next();
+        } else {
+            throw new RuntimeException("Unable to find a writer!");
+        }
+
+        // set up output stream
+        OutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = ImageIO.createImageOutputStream(baos);
+        BufferedImage bi = new BufferedImage(10, 10,
+                                             BufferedImage.TYPE_INT_RGB);
+
+        // dispose the writer, then poke and prod it... the writer should
+        // throw exceptions (which will be caught by this test), but it
+        // should not crash the VM
+        writer.dispose();
+
+        try {
+            writer.setOutput(ios);
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            writer.write(bi);
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            writer.abort();
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            writer.reset();
+        } catch (IllegalStateException e) {
+        }
+
+        try {
+            writer.dispose();
+        } catch (IllegalStateException e) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/DestTypeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 5028259
+ * @summary Verifies that usage of the destination type does not cause the
+ *          increase of size of the result jpeg file
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.event.IIOReadWarningListener;
+import javax.imageio.event.IIOWriteWarningListener;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+public class DestTypeTest implements IIOWriteWarningListener, IIOReadWarningListener {
+
+    ImageWriter w;
+    ImageReader r;
+
+    public static void main(String[] args) throws IOException {
+        BufferedImage bi_rgb = createTestImage(BufferedImage.TYPE_INT_RGB);
+
+        DestTypeTest bug = new DestTypeTest();
+        byte[] rgb_data = bug.writeTest(bi_rgb);
+
+        System.out.println("rgb jpeg data length is " + rgb_data.length);
+
+        BufferedImage bi_argb = createTestImage(BufferedImage.TYPE_INT_ARGB);
+
+        ImageWriteParam p = bug.getWriteParam();
+        IIOMetadata m = bug.getMetadata(p);
+
+        byte[] submeta_data = bug.writeTest(bi_argb, p, m);
+        System.out.println("desttype and metadata jpeg data length is " + submeta_data.length);
+
+        p = bug.getWriteParam();
+        byte[] subbanded_data = bug.writeTest(bi_argb, p);
+        System.out.println("desttype jpeg data length is " + subbanded_data.length);
+
+        if (submeta_data.length > rgb_data.length) {
+            throw new  RuntimeException("Too big result jpeg: " + submeta_data.length +
+                                        "(rgb image size is " + rgb_data.length + ")");
+        }
+        if (subbanded_data.length > rgb_data.length) {
+            throw new  RuntimeException("Too big result jpeg: " + subbanded_data.length +
+                                        "(rgb image size is " + rgb_data.length + ")");
+        }
+    }
+
+    public DestTypeTest() {
+        w = (ImageWriter)
+            ImageIO.getImageWritersByFormatName("jpeg").next();
+        w.addIIOWriteWarningListener(this);
+
+        r = (ImageReader)
+            ImageIO.getImageReadersByFormatName("jpeg").next();
+        r.addIIOReadWarningListener(this);
+    }
+
+    public ImageWriteParam getWriteParam() {
+        ImageWriteParam p =  w.getDefaultWriteParam();
+        p.setSourceBands(new int[] {0, 1, 2});
+        ImageTypeSpecifier type =
+            ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
+        p.setDestinationType(type);
+
+        return p;
+    }
+
+    public IIOMetadata getMetadata(ImageWriteParam p) {
+        return w.getDefaultImageMetadata(p.getDestinationType(), null);
+    }
+
+    public byte[] writeTest(BufferedImage bi) throws IOException {
+        return writeTest(bi, null);
+    }
+
+    public byte[] writeTest(BufferedImage bi,
+                          ImageWriteParam p) throws IOException {
+        return writeTest(bi, p, null);
+    }
+    public byte[] writeTest(BufferedImage bi,
+                            ImageWriteParam p,
+                            IIOMetadata m) throws IOException {
+        ByteArrayOutputStream baos =
+            new ByteArrayOutputStream();
+
+        // write test image as jpeg
+        ImageOutputStream ios =
+            ImageIO.createImageOutputStream(baos);
+        w.setOutput(ios);
+        w.write(null,
+                new IIOImage(bi, null, m),
+                p);
+        ios.close();
+        return baos.toByteArray();
+    }
+
+    public static BufferedImage createTestImage(int type) {
+        int w = 100;
+        int h = 500;
+        BufferedImage bi = new BufferedImage(3*w, h, type);
+        Graphics g = bi.createGraphics();
+        g.setColor(Color.red);
+        g.fillRect(0,0,w,h);
+        g.setColor(Color.green);
+        g.fillRect(w, 0,w,h);
+        g.setColor(Color.blue);
+        g.fillRect(2*w,0,w,h);
+
+        return bi;
+    }
+
+    public void warningOccurred(ImageWriter source,
+                                int imageIndex,
+                                String warning) {
+        System.out.println("WRITING WARNING: " + warning);
+    }
+
+    public void warningOccurred(ImageReader source,
+                                String warning) {
+        System.out.println("READING WARNING: " + warning);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/JPEGsNotAcceleratedTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4994702
+ * @key headful
+ * @summary verifies that no regression were introduced with the fix for this
+ *          bug
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.ImageCapabilities;
+import java.awt.Rectangle;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBuffer;
+import java.awt.image.VolatileImage;
+import java.awt.image.WritableRaster;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.FileImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class JPEGsNotAcceleratedTest {
+
+    public static final int testRGB = Color.red.getRGB();
+    public static final int TEST_W = 100;
+    public static final int TEST_H = 100;
+    public static final Rectangle roi =
+        new Rectangle(TEST_W/4, TEST_H/4, TEST_W/2, TEST_H/2);
+
+    static Frame f;
+    static boolean showRes = false;
+    static int testsFinished = 0;
+    static int testsStarted = 0;
+    static boolean lowCompression = false;
+
+    static boolean failed = false;
+
+    public JPEGsNotAcceleratedTest(String name) {
+        BufferedImage bi = readTestImage(name, null, null);
+        runTestOnImage("no dest image, no region of interest", bi, null);
+
+        BufferedImage destBI = getDestImage();
+        bi = readTestImage(name, destBI, null);
+        runTestOnImage("w/ dest image, no region of interest", bi, null);
+
+        // steal the raster, see if the destination image
+        // gets accelerated
+        destBI = getDestImage();
+        DataBuffer db =
+            ((WritableRaster)destBI.getRaster()).getDataBuffer();
+        bi = readTestImage(name, destBI, null);
+        runTestOnImage("w/ dest image (with stolen raster),"+
+                       " no region of interest", bi, null);
+
+        bi = readTestImage(name, null, roi);
+        runTestOnImage("no dest image, region of interest", bi, roi);
+
+        destBI = getDestImage();
+        bi = readTestImage(name, destBI, roi);
+        runTestOnImage("w/ dest image, region of interest", bi, roi);
+
+        // accelerate the destination image first, then load
+        // an image into it. Check that the accelerated copy gets
+        // updated
+        destBI = getDestImage();
+        accelerateImage(destBI);
+        bi = readTestImage(name, destBI, roi);
+        runTestOnImage("w/ accelerated dest image,"+
+                       " region of interest", bi, roi);
+
+        synchronized (JPEGsNotAcceleratedTest.class) {
+            testsFinished++;
+            JPEGsNotAcceleratedTest.class.notify();
+        }
+
+    }
+
+    public static BufferedImage readTestImage(String fileName,
+                                   BufferedImage dest,
+                                   Rectangle srcROI)
+    {
+        BufferedImage bi = null;
+
+        try {
+            FileImageInputStream is =
+                new FileImageInputStream(new File(fileName));
+            ImageReader reader =
+                (ImageReader)ImageIO.getImageReaders(is).next();
+            ImageReadParam param = reader.getDefaultReadParam();
+            if (dest != null) {
+                param.setDestination(dest);
+            }
+            if (srcROI != null) {
+                param.setSourceRegion(srcROI);
+            }
+            reader.setInput(is);
+            bi = reader.read(0, param);
+        } catch (IOException e) {
+            System.err.println("Error " + e +
+                               " when reading file: " + fileName);
+            throw new RuntimeException(e);
+        }
+
+        return bi;
+    }
+
+    public static void writeTestImage(String fileName) {
+        BufferedImage bi =
+            new BufferedImage(TEST_W, TEST_H, BufferedImage.TYPE_INT_RGB);
+        Graphics g = bi.getGraphics();
+        g.setColor(new Color(testRGB));
+        g.fillRect(0, 0, TEST_W, TEST_H);
+        try {
+            System.err.printf("Writing %s\n", fileName);
+            if (lowCompression) {
+                ImageWriter iw = (ImageWriter)ImageIO.getImageWritersBySuffix("jpeg").next();
+                if(iw == null) {
+                    throw new RuntimeException("No available image writer for "
+                                               + "jpeg "
+                                               + " Test failed.");
+                }
+
+                File file = new File(fileName);
+                ImageOutputStream ios = ImageIO.createImageOutputStream(file);
+                iw.setOutput(ios);
+
+                ImageWriteParam param = iw.getDefaultWriteParam();
+                param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+                param.setCompressionQuality(1);
+
+                IIOImage iioImg = new IIOImage(bi, null, null);
+                iw.write(null, iioImg, param);
+
+            } else {
+                ImageIO.write(bi, "jpeg", new File(fileName));
+            }
+        } catch (IOException e) {
+            System.err.println("Error " + e +
+                               " when writing file: " + fileName);
+            throw new RuntimeException(e);
+        }
+    }
+
+    public VolatileImage accelerateImage(BufferedImage bi) {
+        VolatileImage testVI = f.createVolatileImage(TEST_W, TEST_H);
+        do {
+            if (testVI.validate(f.getGraphicsConfiguration()) ==
+                VolatileImage.IMAGE_INCOMPATIBLE)
+            {
+                testVI = f.createVolatileImage(TEST_W, TEST_H);
+            }
+            Graphics2D g = testVI.createGraphics();
+            g.setComposite(AlphaComposite.Src);
+            g.setColor(Color.green);
+            g.fillRect(0, 0, TEST_W, TEST_H);
+
+            g.drawImage(bi, 0, 0, null);
+            g.drawImage(bi, 0, 0, null);
+            g.drawImage(bi, 0, 0, null);
+            g.dispose();
+        } while (testVI.contentsLost());
+
+        return testVI;
+    }
+
+    public BufferedImage getDestImage() {
+        BufferedImage destBI =
+            new BufferedImage(TEST_W, TEST_H, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = (Graphics2D)destBI.getGraphics();
+        g.setComposite(AlphaComposite.Src);
+        g.setColor(Color.blue);
+        g.fillRect(0, 0, TEST_W, TEST_H);
+        return destBI;
+    }
+
+    public void runTestOnImage(String desc, BufferedImage bi,
+                               Rectangle srcROI)
+    {
+
+        if (srcROI == null) {
+            srcROI = new Rectangle(0, 0, TEST_W, TEST_H);
+        }
+
+        VolatileImage testVI = accelerateImage(bi);
+
+        ImageCapabilities ic =
+            bi.getCapabilities(f.getGraphicsConfiguration());
+        boolean accelerated = ic.isAccelerated();
+
+        System.err.println("Testing: " + desc +
+                           " -- bi.isAccelerated(): " + accelerated );
+
+        BufferedImage snapshot = testVI.getSnapshot();
+        if (showRes) {
+            showRes(desc, snapshot);
+        }
+
+        for (int y = 0; y < srcROI.height; y++) {
+            for (int x = 0; x < srcROI.width; x++) {
+                int destRGB = snapshot.getRGB(x, y);
+                if (destRGB != testRGB && destRGB != 0xfffe0000) {
+                    failed = true;
+                    System.err.printf("Test failed at %dx%d pixel=%x\n",
+                                      x, y, snapshot.getRGB(x, y));
+                    if (!showRes) {
+                        showRes(desc, snapshot);
+                    }
+                    break;
+                }
+            }
+        }
+    }
+
+    static int startX = 64, startY = 0;
+    static int frameX = startX, frameY = startY;
+    private static void showRes(String desc, final BufferedImage src) {
+        final int w = src.getWidth();
+        final int h = src.getHeight();
+
+        Frame f = new Frame(desc+": dbl-click to exit");
+        Component c;
+        f.add(c = new Component() {
+            public Dimension getPreferredSize() {
+                return new Dimension(w,h);
+            }
+
+            public void paint(Graphics g) {
+                g.clearRect(0, 0, getWidth(), getHeight());
+                g.drawImage(src, 0,0, null);
+            }
+        });
+        c.addMouseListener(new MouseAdapter() {
+            public void mouseClicked(MouseEvent e) {
+                if (e.getClickCount() > 1) {
+                    System.exit(0);
+                }
+            }
+        });
+        f.pack();
+        synchronized (JPEGsNotAcceleratedTest.class) {
+            f.setLocation(frameX, frameY);
+            frameX += f.getWidth();
+            if ((frameX + f.getWidth()) >
+                f.getGraphicsConfiguration().getBounds().width)
+            {
+                frameY += TEST_H;
+                if ((frameY + f.getHeight()) >
+                    f.getGraphicsConfiguration().getBounds().height)
+                {
+                    startY += 30;
+                    startX += 30;
+                    frameY = startY;
+                }
+                frameX = startX;
+            }
+        };
+        f.setVisible(true);
+    }
+
+    public static void usage() {
+        System.err.println("Usage: java Test [file name] [-write][-show][-low]");
+        System.exit(0);
+    }
+
+    public static void main(String[] args) {
+        System.setProperty("sun.java2d.pmoffscreen", "true");
+        System.setProperty("sun.java2d.ddforcevram", "true");
+        String name = "red.jpg";
+
+        f = new Frame();
+        f.pack();
+
+        if (f.getGraphicsConfiguration().getColorModel().getPixelSize() < 16) {
+            System.err.println("8-bit display mode detected, dithering issues possible, "+
+                               "considering test passed.");
+            f.dispose();
+            return;
+        }
+
+
+        for (String arg : args) {
+            if (arg.equals("-write")) {
+                writeTestImage(name);
+                System.exit(0);
+            } else if (arg.equals("-show")) {
+                showRes = true;
+            } else if (arg.equals("-low")) {
+                lowCompression = true;
+                name ="red_low.jpg";
+                System.err.println("Using low jpeg compression");
+            } else if (arg.equals("-help")) {
+                usage();
+            } else {
+                final String filename = arg;
+                testsStarted++;
+                new Thread(new Runnable() {
+                    public void run() {
+                        new JPEGsNotAcceleratedTest(filename);
+                    }
+                }).start();
+            }
+        }
+
+        if (testsStarted == 0) {
+            writeTestImage(name);
+            testsStarted++;
+            new JPEGsNotAcceleratedTest(name);
+        }
+
+
+        synchronized (JPEGsNotAcceleratedTest.class) {
+            while (testsFinished < testsStarted) {
+                try {
+                    JPEGsNotAcceleratedTest.class.wait(100);
+                } catch (InterruptedException e) {
+                    failed = true; break;
+                }
+            }
+        }
+
+        f.dispose();
+        if (failed) {
+            throw new RuntimeException("Test failed");
+        }
+
+        System.err.println("Passed.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/MergeTreeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4895547
+ * @summary Test verifies that mergeTree() of JPEGMetadata does not throw the
+ *          NPE
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+
+import org.w3c.dom.Node;
+
+public class MergeTreeTest {
+    public static void main(String[] args) throws IOException {
+        ImageWriter iw =
+            (ImageWriter)ImageIO.getImageWritersByFormatName("jpeg").next();
+
+        ImageTypeSpecifier type =
+            ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_RGB);
+
+        ImageOutputStream ios =
+            ImageIO.createImageOutputStream(new File("MergeTreeTest.jpeg"));
+        iw.setOutput(ios);
+
+        IIOMetadata meta = iw.getDefaultImageMetadata(type, null);
+
+        boolean isFailed = false;
+
+        String[] fmts = meta.getMetadataFormatNames();
+        for (int i=0; i<fmts.length; i++) {
+            System.out.print("Format: " + fmts[i] + " ... ");
+            Node root = meta.getAsTree(fmts[i]);
+            try {
+                meta.mergeTree(fmts[i], root);
+            } catch (NullPointerException e) {
+                throw new RuntimeException("Test failed for format " + fmts[i], e);
+            }
+            System.out.println("PASSED");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/RasterWithMinXTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4843895
+ * @summary Tests that we handle raster with non-zero minX and minY correctly
+ * @modules java.desktop/com.sun.imageio.plugins.jpeg
+ */
+
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.awt.image.RasterFormatException;
+import java.awt.image.WritableRaster;
+import java.io.ByteArrayOutputStream;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class RasterWithMinXTest {
+
+    public static void main(String[] args) {
+        String format = "jpeg";
+
+        // Set output file.
+        ImageOutputStream output = new MemoryCacheImageOutputStream(new ByteArrayOutputStream());
+
+        // Create image.
+        BufferedImage bi = new BufferedImage(256, 256,
+                                             BufferedImage.TYPE_3BYTE_BGR);
+
+        // Populate image.
+        int[] rgbArray = new int[256];
+        for(int i = 0; i < 256; i++) {
+            Arrays.fill(rgbArray, i);
+            bi.setRGB(0, i, 256, 1, rgbArray, 0, 256);
+        }
+
+        // create translated raster in order to get non-zero minX and minY
+        WritableRaster r = (WritableRaster)bi.getRaster().createTranslatedChild(64,64);
+
+        Iterator i =  ImageIO.getImageWritersByFormatName(format);
+        ImageWriter iw = null;
+        while(i.hasNext() && iw == null) {
+            Object o = i.next();
+            if (o instanceof com.sun.imageio.plugins.jpeg.JPEGImageWriter) {
+                iw = (ImageWriter)o;
+            }
+        }
+        if (iw == null) {
+            throw new RuntimeException("No available image writer");
+        }
+
+         ImageWriteParam iwp = iw.getDefaultWriteParam();
+         IIOMetadata metadata = iw.getDefaultImageMetadata(new ImageTypeSpecifier(bi.getColorModel(), r.getSampleModel()), iwp);
+
+         IIOImage img = new IIOImage(r, null, metadata);
+
+         iw.setOutput(output);
+         try {
+             iw.write(img);
+         } catch (RasterFormatException e) {
+             e.printStackTrace();
+             throw new RuntimeException("RasterException occurs. Test Failed!");
+         } catch (Exception ex) {
+             ex.printStackTrace();
+             throw new RuntimeException("Unexpected Exception");
+         }
+
+         // test case of theImageWriteParam with non-null sourceRegion
+         iwp.setSourceRegion(new Rectangle(32,32,192,192));
+         metadata = iw.getDefaultImageMetadata(new ImageTypeSpecifier(bi.getColorModel(), r.getSampleModel()), iwp);
+         try {
+             iw.write(metadata, img, iwp);
+         } catch (RasterFormatException e) {
+             e.printStackTrace();
+             throw new RuntimeException("SetSourceRegion causes the RasterException. Test Failed!");
+         } catch (Exception ex) {
+             ex.printStackTrace();
+             throw new RuntimeException("Unexpected Exception");
+         }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/ResetOutOfMemory.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4411955
+ * @summary Checks that the JPEG writer does not throw an OutOfMemoryError from
+ *          its reset() method
+ * @modules java.desktop/com.sun.imageio.plugins.jpeg
+ */
+
+import javax.imageio.ImageWriter;
+
+import com.sun.imageio.plugins.jpeg.JPEGImageWriter;
+
+public class ResetOutOfMemory {
+
+    public static void main(String args[]) {
+        ImageWriter writer = new JPEGImageWriter(null);
+        try {
+            writer.reset();
+        } catch (OutOfMemoryError e) {
+            throw new RuntimeException("Got OutOfMemoryError!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/UshortGrayTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4450894
+ * @summary Tests if the JPEGImageWriter allows images with > 8-bit samples to
+ *          be written. Also tests the JPEGImageWriterSpi.canEncodeImage()
+ *          mechanism for this same behavior.
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class UshortGrayTest {
+
+    public static void main(String[] args) {
+        Iterator iter;
+        BufferedImage bi = new BufferedImage(10, 10,
+                                             BufferedImage.TYPE_USHORT_GRAY);
+
+        // Part 1: ensure that JPEGImageWriter throws an exception if it
+        // encounters an image with 16-bit samples
+        ImageWriter writer = null;
+        iter = ImageIO.getImageWritersByFormatName("jpeg");
+        if (iter.hasNext()) {
+            writer = (ImageWriter)iter.next();
+        } else {
+            throw new RuntimeException("No JPEG reader found");
+        }
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream ios = null;
+        boolean exceptionThrown = false;
+
+        try {
+            ios = ImageIO.createImageOutputStream(baos);
+        } catch (IOException ioe) {
+            throw new RuntimeException("Could not create ImageOutputStream");
+        }
+
+        try {
+            writer.setOutput(ios);
+            writer.write(bi);
+        } catch (IOException ioe) {
+            exceptionThrown = true;
+        }
+
+        if (!exceptionThrown) {
+            throw new RuntimeException("JPEG writer should not be able to " +
+                                       "write USHORT_GRAY images");
+        }
+
+        // Part 2: ensure that JPEGImageWriterSpi.canEncodeImage() returns
+        // false for images with 16-bit samples
+        ImageTypeSpecifier its =
+            ImageTypeSpecifier.createFromRenderedImage(bi);
+
+        iter = ImageIO.getImageWriters(its, "jpeg");
+        if (iter.hasNext()) {
+            throw new RuntimeException("JPEG writer should not be available" +
+                                       " for USHORT_GRAY images");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/CanEncodeShort.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4474819
+ * @summary Tests whether the PNGImageWriterSpi advertises that it is capable of
+ *          writing images of TYPE_USHORT_565_RGB and TYPE_USHORT_555_RGB. The
+ *          test fails if an exception is thrown.
+ */
+
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+
+public class CanEncodeShort {
+
+    private static final int[] types = new int[] {
+        BufferedImage.TYPE_USHORT_565_RGB,
+        BufferedImage.TYPE_USHORT_555_RGB,
+    };
+
+    private static final String[] typeNames = new String[] {
+        "TYPE_USHORT_565_RGB",
+        "TYPE_USHORT_555_RGB",
+    };
+
+    public static void main(String[] args) {
+        for (int i = 0; i < types.length; i++) {
+            BufferedImage img = new BufferedImage(32, 32, types[i]);
+
+            ImageTypeSpecifier spec =
+                ImageTypeSpecifier.createFromRenderedImage(img);
+
+            Iterator writers = ImageIO.getImageWriters(spec, "png");
+
+            if (!writers.hasNext()) {
+                throw new RuntimeException("Test failed: " +
+                                           "no PNG writer found for type " +
+                                           typeNames[i]);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/ImageCompare.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+
+// Utility to compare two BufferedImages for RGB equality
+public class ImageCompare {
+
+    public static void compare(BufferedImage oldimg,
+                               BufferedImage newimg) {
+        int width = oldimg.getWidth();
+        int height = oldimg.getHeight();
+        if (newimg.getWidth() != width || newimg.getHeight() != height) {
+            throw new RuntimeException("Dimensions changed!");
+        }
+
+        Raster oldras = oldimg.getRaster();
+        ColorModel oldcm = oldimg.getColorModel();
+        Raster newras = newimg.getRaster();
+        ColorModel newcm = newimg.getColorModel();
+
+        for (int j = 0; j < height; j++) {
+            for (int i = 0; i < width; i++) {
+                Object oldpixel = oldras.getDataElements(i, j, null);
+                int oldrgb = oldcm.getRGB(oldpixel);
+                int oldalpha = oldcm.getAlpha(oldpixel);
+
+                Object newpixel = newras.getDataElements(i, j, null);
+                int newrgb = newcm.getRGB(newpixel);
+                int newalpha = newcm.getAlpha(newpixel);
+
+                if (newrgb != oldrgb ||
+                    newalpha != oldalpha) {
+                    throw new RuntimeException("Pixels differ at " + i +
+                                               ", " + j);
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/PngPremultAlphaTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4888478
+ * @summary Test that colors do not distort when buffered image with
+ *          premultiplied alpha is encoded to png format
+ */
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.imageio.ImageIO;
+
+public class PngPremultAlphaTest {
+    protected static int width = 100;
+    protected static int height = 100;
+
+    protected static String format = "png";
+
+    protected static int[] iBufferedImageTypes = {
+        BufferedImage.TYPE_INT_RGB,
+        BufferedImage.TYPE_INT_ARGB,
+        BufferedImage.TYPE_4BYTE_ABGR_PRE,
+        BufferedImage.TYPE_INT_ARGB_PRE
+    };
+
+    protected static String[] strBufferedImageTypes = {
+        "TYPE_INT_RGB",
+        "TYPE_INT_ARGB",
+        "BufferedImage.TYPE_4BYTE_ABGR_PRE",
+        "BufferedImage.TYPE_INT_ARGB_PRE"
+    };
+
+    public static void main(String[] arg) {
+        for(int i=0; i<iBufferedImageTypes.length; i++) {
+            System.out.println("Test for " + strBufferedImageTypes[i]);
+            doTest(iBufferedImageTypes[i]);
+        }
+    }
+
+    public static void doTest(int type) {
+        try {
+            BufferedImage src = new BufferedImage(100, 100,
+                                                  type);
+            Graphics2D g = src.createGraphics();
+            g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC, 0.5f));
+            g.setColor(new Color(0x20, 0x40, 0x60));
+            g.fillRect(0,0,100,100);
+
+            int[] samples = new int[src.getData().getNumBands()];
+            src.getData().getPixels(0,0,1,1,samples);
+            for(int i=0; i<samples.length; i++) {
+                System.out.println("sample["+i+"]="+Integer.toHexString(samples[i]));
+            }
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ImageIO.write(src, format, baos);
+            baos.close();
+
+
+            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+            BufferedImage dst = ImageIO.read(bais);
+
+            isSameColors(src, dst);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Test failed.");
+        }
+    }
+
+    private static boolean isSameColors(BufferedImage src, BufferedImage dst) {
+        Object dstPixel = dst.getRaster().getDataElements(width/2, height/2, null);
+        Object srcPixel = src.getRaster().getDataElements(width/2, height/2, null);
+
+        // take into account the rounding error
+        if ( Math.abs(src.getColorModel().getRed(srcPixel) -  dst.getColorModel().getRed(dstPixel)) > 1
+             || Math.abs(src.getColorModel().getGreen(srcPixel) - dst.getColorModel().getGreen(dstPixel)) > 1
+             || Math.abs(src.getColorModel().getBlue(srcPixel) - dst.getColorModel().getBlue(dstPixel)) > 1) {
+            showPixel(src, width/2, height/2);
+            showPixel(dst, width/2, height/2);
+
+            throw new RuntimeException( "Colors are different: "
+                                        + Integer.toHexString(src.getColorModel().getRGB(srcPixel))
+                                        + " and "
+                                        + Integer.toHexString(dst.getColorModel().getRGB(dstPixel)));
+        }
+        return true;
+    }
+
+    private static void showPixel(BufferedImage src, int x, int y) {
+        System.out.println("Img is " + src);
+        System.out.println("CM is " + src.getColorModel().getClass().getName());
+        Object p = src.getRaster().getDataElements(x, y, null);
+        System.out.println("RGB:   " +
+                           Integer.toHexString(src.getColorModel().getRGB(p)));
+        System.out.println("Red:   " +
+                           Integer.toHexString(src.getColorModel().getRed(p)));
+        System.out.println("Green: " +
+                           Integer.toHexString(src.getColorModel().getGreen(p)));
+        System.out.println("Blue:  " +
+                           Integer.toHexString(src.getColorModel().getBlue(p)));
+        System.out.println("Alpha: " +
+                           Integer.toHexString(src.getColorModel().getAlpha(p)));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/ShortPaletteTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4826548
+ * @summary Tests for reading PNG images with 5,6,7 and 8 colors in palette
+ */
+
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+public class ShortPaletteTest {
+
+    public static void main(String[] args) {
+
+        for (int numberColors = 2; numberColors <= 16; numberColors++) {
+            try {
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                BufferedImage image = createImage(numberColors);
+                ImageIO.write(image, "png", baos);
+                baos.close();
+                System.out.println("Number of colors: " + numberColors);
+                byte[] buffer = baos.toByteArray();
+                ByteArrayInputStream bais = new ByteArrayInputStream(buffer);
+                ImageIO.read(bais);
+                System.out.println("OK");
+            } catch (ArrayIndexOutOfBoundsException e) {
+                e.printStackTrace();
+                throw new RuntimeException("Test failed.");
+            } catch (IOException e) {
+                e.printStackTrace();
+                throw new RuntimeException("Unexpected exception was thrown."
+                                           + " Test failed.");
+            }
+        }
+    }
+
+    private static IndexColorModel createColorModel(int numberColors) {
+
+        byte[] colors = new byte[numberColors*3];
+        int depth = 4;
+        int startIndex = 0;
+
+        return new IndexColorModel(depth,
+                                   numberColors,
+                                   colors,
+                                   startIndex,
+                                   false);
+    }
+
+    private static BufferedImage createImage(int numberColors) {
+        return new BufferedImage(32,
+                                 32,
+                                 BufferedImage.TYPE_BYTE_BINARY,
+                                 createColorModel(numberColors));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/png/WriteProgressive.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4432615
+ * @summary Tests progressive writing in the PNG encoder
+ * @modules java.desktop/com.sun.imageio.plugins.png
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Random;
+
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class WriteProgressive {
+
+    public static void main(String[] args) throws IOException {
+        Iterator witer = ImageIO.getImageWritersByFormatName("png");
+        ImageWriter w = (ImageWriter)witer.next();
+
+        File f = File.createTempFile("WriteProgressive", ".png");
+        ImageOutputStream ios = ImageIO.createImageOutputStream(f);
+        w.setOutput(ios);
+
+        BufferedImage bi = new BufferedImage(100, 100,
+                                             BufferedImage.TYPE_3BYTE_BGR);
+        Graphics2D g = bi.createGraphics();
+        Random r = new Random(10);
+        for (int i = 0; i < 10000; i++) {
+            Color c =
+                new Color(r.nextInt(256), r.nextInt(256), r.nextInt(256));
+            g.setColor(c);
+            g.fillRect(r.nextInt(100), r.nextInt(100), 1, 1);
+        }
+
+        IIOImage iioimage = new IIOImage(bi, null, null);
+
+        ImageWriteParam param = w.getDefaultWriteParam();
+        param.setProgressiveMode(ImageWriteParam.MODE_DEFAULT);
+
+        try {
+            w.write(null, iioimage, param);
+        } catch (NullPointerException npe) {
+            throw new RuntimeException("Got NPE during write!");
+        }
+
+        ios.close();
+
+        BufferedImage bi2 = ImageIO.read(f);
+        f.delete();
+
+        ImageCompare.compare(bi, bi2);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/EmptyInputWbmpMetadataTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4895483
+ * @summary Test checks that the IllegalStateException was thrown if input was
+ *          not set to the WBMPImageReader
+ */
+
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.metadata.IIOMetadata;
+
+public class EmptyInputWbmpMetadataTest {
+    private static String fmt = "BMP";
+
+    public static void main(String[] args) {
+        boolean isPassed = false;
+        ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(fmt).next();
+
+        if (ir == null) {
+            throw new RuntimeException("No available reader for " + fmt);
+        }
+        IIOMetadata meta = null;
+        try {
+            meta = ir.getImageMetadata(0);
+        } catch (IllegalStateException e) {
+            System.out.println("Correct exception was thrown. Test passed.");
+            isPassed = true;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        if (!isPassed) {
+            throw new RuntimeException("The IllegalStateException was not thrown."
+                                       +"Test failed.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/GetImageTypesTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4928273
+ * @summary Verifies what IllegalStateException is thrown if image input was not
+ *          set
+ */
+
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+
+public class GetImageTypesTest {
+
+    private static final String format = "wbmp";
+
+    public static void main(String[] args) {
+
+        boolean passed = false;
+        ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName(format).next();
+
+        if (ir == null) {
+            throw new RuntimeException("No matching reader found. Test Failed");
+        }
+
+        try {
+            Iterator types = ir.getImageTypes(0);
+        } catch (IllegalStateException e) {
+            System.out.println("Test passed.");
+            passed = true;
+        } catch (Exception e) {
+            throw new RuntimeException("Unexpected exception was thrown. "
+                                       + "Test failed.");
+        }
+
+        if (!passed) {
+            throw new RuntimeException("IllegalStateException is not thrown when "
+                                       + "calling getImageTypes() without setting "
+                                       + "the input source for the image format: "
+                                       + format
+                                       + ". Test failed");
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/ValidWbmpTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4924512
+ * @summary Test that wbmp image reader detects incorrect image format
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+
+public class ValidWbmpTest {
+
+    public static void main(String[] args) {
+        try {
+            String[] formats = { "JPEG", "PNG", "BMP" };
+
+            BufferedImage img = new BufferedImage(100, 100,
+                                                  BufferedImage.TYPE_BYTE_GRAY);
+            Graphics g = img.createGraphics();
+            g.setColor(Color.white);
+            g.fillRect(0,0,100,100);
+            g.setColor(Color.black);
+            g.fillRect(10,10,80,80);
+
+            ImageReader ir = (ImageReader)ImageIO.getImageReadersByFormatName("WBMP").next();
+            if (ir==null) {
+                throw new RuntimeException("No readers for WBMP format!");
+            }
+            for(int i=0; i<formats.length; i++) {
+                System.out.println("Test " + formats[i] + " stream...");
+                boolean passed = false;
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                ImageIO.write(img, formats[i], baos);
+                baos.close();
+                ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+                ImageInputStream iis = null;
+                iis = ImageIO.createImageInputStream(bais);
+                ir.setInput(iis);
+                try {
+                    BufferedImage res = ir.read(0);
+                } catch (IIOException e) {
+                    StackTraceElement[] stack = e.getStackTrace();
+                    if (ir.getClass().getName().equals(stack[0].getClassName())
+                        && "readHeader".equals(stack[0].getMethodName()))
+                    {
+                        passed = true;
+                    }
+                } catch (Throwable t) {
+                    t.printStackTrace();
+                }
+
+                if (!passed) {
+                    throw new RuntimeException("Test failed!");
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Unexpected exception. Test failed.");
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/WBMPPluginTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4641872
+ * @summary Tests writing and reading abilities of WBMP plugin
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
+import java.awt.image.Raster;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.IIOException;
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+public class WBMPPluginTest {
+
+    private static final int[] types = {
+        BufferedImage.TYPE_INT_RGB, // = 1;
+        BufferedImage.TYPE_INT_ARGB, // = 2;
+        BufferedImage.TYPE_INT_ARGB_PRE, // = 3;
+        BufferedImage.TYPE_INT_BGR, // = 4;
+        BufferedImage.TYPE_3BYTE_BGR, // = 5;
+        BufferedImage.TYPE_4BYTE_ABGR, // = 6;
+        BufferedImage.TYPE_4BYTE_ABGR_PRE, // 7
+        BufferedImage.TYPE_USHORT_565_RGB, // 8
+        BufferedImage.TYPE_USHORT_555_RGB, // 9
+        BufferedImage.TYPE_BYTE_GRAY, // 10
+        BufferedImage.TYPE_USHORT_GRAY, //11
+        BufferedImage.TYPE_BYTE_BINARY, //12
+        BufferedImage.TYPE_BYTE_INDEXED //13
+    };
+
+    private static String format = "WBMP";
+
+    private static ImageReader ir = null;
+    private static ImageWriter iw = null;
+    private BufferedImage img;
+    private ImageWriteParam param;
+    private ByteArrayOutputStream baos;
+
+    private static void init() {
+
+        Iterator i = ImageIO.getImageWritersByFormatName(format);
+        if (!i.hasNext()) {
+            throw new RuntimeException("No available ImageWrites for "+format+" format!");
+        }
+        iw = (ImageWriter)i.next();
+
+        i = ImageIO.getImageReadersByFormatName(format);
+        if (!i.hasNext()) {
+            throw new RuntimeException("No available ImageReaders for " +format+" format!");
+        }
+
+        ir = (ImageReader)i.next();
+    }
+
+    public static void main(String[] args) {
+        if (args.length > 0) {
+            format = args[0];
+            System.out.println("Test format " + format);
+        }
+
+        init();
+        ImageIO.setUseCache(false);
+
+        for (int i=0; i<types.length; i++) {
+            boolean bPassed = true;
+            Object reason = null;
+
+            try {
+
+                BufferedImage image = createTestImage(types[i]);
+
+                ImageWriteParam param = iw.getDefaultWriteParam();
+
+                WBMPPluginTest t = new WBMPPluginTest(image, param);
+                boolean res = false;
+                res = t.test();
+                if (!res) {
+                    bPassed = false;
+                    reason = new String("Null result");
+                }
+            } catch (IllegalArgumentException ex) {
+                System.out.println("Expected exception type was caught: " + ex);
+
+            } catch (Throwable ex ) {
+                System.out.println("FAILED");
+                ex.printStackTrace();
+                bPassed = false;
+                reason = ex;
+                throw new RuntimeException("Test for type " + types[i] + " FAILED due to exception");
+            }
+/*
+            System.out.println("Type " + types[i] + " result: " +
+                               (bPassed ? "PASSED" : "FAILED") +
+                               ((reason != null) ? (" Reason: " + reason) : ""));
+*/
+            System.out.println("Test for type " + types[i] + " PASSED");
+        }
+
+        System.out.println("END OF TEST");
+    }
+
+    public WBMPPluginTest(BufferedImage img, ImageWriteParam param) {
+
+        this.img = img;
+        this.param = param;
+        baos = new ByteArrayOutputStream();
+    }
+
+    public boolean test() throws IIOException, IOException {
+
+        ir.reset();
+        iw.reset();
+
+        String[] suffixes = iw.getOriginatingProvider().getFileSuffixes();
+
+        IIOMetadata md = iw.getDefaultImageMetadata(new ImageTypeSpecifier(img), param);
+        IIOImage iio_img = new IIOImage(img, null, md);
+
+        System.out.println("Image type " + img.getType());
+
+        String fname = "test"+img.getType()+"."+suffixes[0];
+
+        iw.setOutput(ImageIO.createImageOutputStream(new FileOutputStream(new File(fname))));
+        System.out.print("write image ... ");
+        iw.write(iio_img);
+        System.out.println("OK");
+        System.out.print("read image ... ");
+
+        byte[] ba_image = baos.toByteArray();
+
+        ByteArrayInputStream bais = new ByteArrayInputStream(ba_image);
+
+        ir.setInput(ImageIO.createImageInputStream(new FileInputStream(new File(fname))));
+
+        BufferedImage res = ir.read(0);
+        System.out.println("OK");
+
+        System.out.print("compare images ... ");
+        boolean r = compare(img,res);
+        System.out.println(r?"OK":"FAILED");
+        return r;
+    }
+
+    private boolean compare(BufferedImage in, BufferedImage out) {
+        int width = in.getWidth();
+        int height = in.getHeight();
+        if (out.getWidth() != width || out.getHeight() != height) {
+            throw new RuntimeException("Dimensions changed!");
+        }
+
+        Raster oldras = in.getRaster();
+        ColorModel oldcm = in.getColorModel();
+        Raster newras = out.getRaster();
+        ColorModel newcm = out.getColorModel();
+
+        for (int j = 0; j < height; j++) {
+            for (int i = 0; i < width; i++) {
+                Object oldpixel = oldras.getDataElements(i, j, null);
+                int oldrgb = oldcm.getRGB(oldpixel);
+                int oldalpha = oldcm.getAlpha(oldpixel);
+
+                Object newpixel = newras.getDataElements(i, j, null);
+                int newrgb = newcm.getRGB(newpixel);
+                int newalpha = newcm.getAlpha(newpixel);
+
+                if (newrgb != oldrgb ||
+                    newalpha != oldalpha) {
+                    throw new RuntimeException("Pixels differ at " + i +
+                                               ", " + j);
+                }
+            }
+        }
+        return true;
+    }
+
+
+    private static BufferedImage createTestImage(int type) throws IOException {
+
+        int w = 200;
+        int h = 200;
+        BufferedImage b = new BufferedImage(w, h, type);
+        Graphics2D g = b.createGraphics();
+        g.setColor(Color.white);
+        g.fillRect(0,0, w, h);
+        g.setColor(Color.black);
+        g.fillOval(10, 10, w -20, h-20);
+
+        return b;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/WbmpBigDestinationTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4929367
+ * @summary tests what BMP image was decoded correctly if destination buffered
+ *          image is bigger than source image
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+
+public class WbmpBigDestinationTest {
+    static String format = "WBMP";
+    public static void main(String[] args) {
+        try {
+            BufferedImage src = new BufferedImage(100, 100,
+                                                  BufferedImage.TYPE_BYTE_BINARY);
+            Graphics2D g = src.createGraphics();
+            g.setColor(Color.white);
+            g.fillRect(0,0,100, 100);
+
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+            ImageWriter iw =
+                (ImageWriter)ImageIO.getImageWritersByFormatName(format).next();
+            if (iw == null) {
+                throw new RuntimeException("No writer available. Test failed.");
+            }
+
+            iw.setOutput(ImageIO.createImageOutputStream(baos));
+            iw.write(src);
+
+            byte[] data = baos.toByteArray();
+
+            ImageReader ir =
+                (ImageReader)ImageIO.getImageReadersByFormatName(format).next();
+            ir.setInput(
+                ImageIO.createImageInputStream(
+                    new ByteArrayInputStream(data)));
+
+            Iterator specifiers = ir.getImageTypes(0);
+            ImageTypeSpecifier typeSpecifier = null;
+
+            if (specifiers.hasNext()) {
+                typeSpecifier = (ImageTypeSpecifier) specifiers.next();
+            }
+            ImageReadParam param = new ImageReadParam();
+            BufferedImage dst = typeSpecifier.createBufferedImage(200, 200);
+            param.setDestination(dst);
+
+            ir.read(0, param);
+
+            checkResults(src,dst);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("Unexpected exception. Test failed.");
+        }
+    }
+
+    private static void checkResults(BufferedImage src, BufferedImage dst) {
+        for(int x=0; x<src.getWidth(); x++) {
+            for(int y=0; y<src.getHeight(); y++) {
+                int srcRgb = src.getRGB(x,y);
+                int dstRgb = dst.getRGB(x,y);
+                if (srcRgb != dstRgb) {
+                    throw new RuntimeException("Images are different at point ["
+                                               + x + "," + y + "]");
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/wbmp/WbmpDefaultImageMetadataTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4895512
+ * @summary Test that WBMPImageWriter return non-null default image metadata
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.util.Iterator;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.metadata.IIOMetadata;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+public class WbmpDefaultImageMetadataTest {
+    ImageWriter writer = null;
+    IIOMetadata imageData = null;
+    ImageWriteParam writeParam = null;
+    BufferedImage bimg = null;
+
+    public WbmpDefaultImageMetadataTest(String format) {
+        try {
+            bimg = new BufferedImage(200, 200, bimg.TYPE_INT_RGB);
+            Graphics gg = bimg.getGraphics();
+            gg.setColor(Color.red);
+            gg.fillRect(50, 50, 100, 100);
+
+            Iterator it = ImageIO.getImageWritersByFormatName(format);
+            if (it.hasNext()) {
+                writer = (ImageWriter) it.next();
+            }
+            if (writer == null) {
+                throw new RuntimeException("No writer available for the given format."
+                                           + " Test failed.");
+            }
+            writeParam = writer.getDefaultWriteParam();
+
+            System.out.println("Testing Image Metadata for "+format+"\n");
+            imageData = writer.getDefaultImageMetadata(new ImageTypeSpecifier(bimg), writeParam);
+            if (imageData == null) {
+                System.out.println("return value is null. No default image metadata is associated with "+format+" writer");
+                throw new RuntimeException("Default image metadata is null."
+                                           + " Test failed.");
+            }
+            int j = 0;
+            String imageDataNames[] = null;
+            if(imageData != null) {
+                System.out.println("Is standard metadata format supported (Image) ? "+
+                                   imageData.isStandardMetadataFormatSupported() );
+                imageDataNames = imageData.getMetadataFormatNames();
+                System.out.println("\nAll supported Metadata Format Names\n");
+                if(imageDataNames!=null){
+                    for(j=0; j<imageDataNames.length; j++)  {
+                        System.out.println("FORMAT NAME: "+imageDataNames[j]);
+                        if (imageDataNames[j].equals(imageData.getNativeMetadataFormatName())) {
+                            System.out.println("This is a Native Metadata format\n");
+                        } else {
+                            System.out.println("\n");
+                        }
+                        System.out.println("");
+                        System.out.println("IIOImageMetadata DOM tree for "+imageDataNames[j]);
+                        System.out.println("");
+                        Node imageNode = imageData.getAsTree(imageDataNames[j]);
+                        displayMetadata(imageNode);
+                        System.out.println("\n\n");
+                    }
+                }
+            }
+        }catch(Exception e){
+            e.printStackTrace();
+            throw new RuntimeException("Exception was thrown."
+                                       + " Test failed.");
+        }
+    }
+
+    public void displayMetadata(Node root) {
+        displayMetadata(root, 0);
+    }
+
+    void indent(int level) {
+        for (int i = 0; i < level; i++) {
+            System.out.print(" ");
+        }
+    }
+
+    void displayMetadata(Node node, int level) {
+        indent(level); // emit open tag
+        System.out.print("<" + node.getNodeName());
+        NamedNodeMap map = node.getAttributes();
+        if (map != null) { // print attribute values
+            int length = map.getLength();
+            for (int i = 0; i < length; i++) {
+                Node attr = map.item(i);
+                System.out.print(" " + attr.getNodeName() +
+                                 "=\"" + attr.getNodeValue() + "\"");
+            }
+        }
+        Node child = node.getFirstChild();
+
+        if (node.getNodeValue() != null && !node.getNodeValue().equals("") ) {
+            System.out.println(">");
+            indent(level);
+            System.out.println(node.getNodeValue());
+            indent(level); // emit close tag
+            System.out.println("</" + node.getNodeName() + ">");
+        } else  if (child != null) {
+            System.out.println(">"); // close current tag
+            while (child != null) { // emit child tags recursively
+                displayMetadata(child, level + 1);
+                child = child.getNextSibling();
+            }
+            indent(level); // emit close tag
+            System.out.println("</" + node.getNodeName() + ">");
+        } else {
+            System.out.println("/>");
+        }
+    }
+
+    public static void main(String args[]) {
+        WbmpDefaultImageMetadataTest test =
+            new WbmpDefaultImageMetadataTest("wbmp");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/AppletContextTest/BadPluginConfigurationTest.sh	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,272 @@
+#!/bin/ksh -p
+# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+#   @test
+#
+#   @bug        6342404 7078379 8167503
+#
+#   @summary    Test verifies that incorrectly configured ImageIO plugin spi
+#               does not affect registration of other ImageIO plugin in the
+#               applet context.
+#
+#
+#   @compile    IIOPluginTest.java
+#   @compile    DummyReaderPluginSpi.java
+#   @run shell  BadPluginConfigurationTest.sh
+
+# There are several resources which need to be present before many
+#  shell scripts can run.  Following are examples of how to check for
+#  many common ones.
+#
+# Note that the shell used is the Korn Shell, KSH
+#
+# Also note, it is recommended that make files NOT be used.  Rather,
+#  put the individual commands directly into this file.  That way,
+#  it is possible to use command line arguments and other shell tech-
+#  niques to find the compiler, etc on different systems.  For example,
+#  a different path could be used depending on whether this were a
+#  Solaris or Win32 machine, which is more difficult (if even possible)
+#  in a make file.
+
+
+# Beginning of subroutines:
+status=1
+
+#Call this from anywhere to fail the test with an error message
+# usage: fail "reason why the test failed"
+fail()
+ { echo "The test failed :-("
+   echo "$*" 1>&2
+   echo "exit status was $status"
+   exit $status
+ } #end of fail()
+
+#Call this from anywhere to pass the test with a message
+# usage: pass "reason why the test passed if applicable"
+pass()
+ { echo "The test passed!!!"
+   echo "$*" 1>&2
+   exit 0
+ } #end of pass()
+
+# end of subroutines
+
+
+# The beginning of the script proper
+
+# Checking for proper OS
+OS=`uname -s`
+case "$OS" in
+   SunOS | Linux | Darwin )
+      FILESEP="/"
+      PATHSEP=":"
+      TMP=`cd /tmp; pwd -P`
+      ;;
+
+   Windows* )
+      FILESEP="\\"
+      PATHSEP=";"
+      TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
+      ;;
+
+   CYGWIN* )
+      FILESEP="/"
+      PATHSEP=";"
+      TMP="/tmp"
+      ;;
+
+   # catch all other OSs
+   * )
+      echo "Unrecognized system!  $OS"
+      fail "Unrecognized system!  $OS"
+      ;;
+esac
+
+# Want this test to run standalone as well as in the harness, so do the
+#  following to copy the test's directory into the harness's scratch directory
+#  and set all appropriate variables:
+
+if [ -z "${TESTJAVA}" ] ; then
+   # TESTJAVA is not set, so the test is running stand-alone.
+   # TESTJAVA holds the path to the root directory of the build of the JDK
+   # to be tested.  That is, any java files run explicitly in this shell
+   # should use TESTJAVA in the path to the java interpreter.
+   # So, we'll set this to the JDK spec'd on the command line.  If none
+   # is given on the command line, tell the user that and use a cheesy
+   # default.
+   # THIS IS THE JDK BEING TESTED.
+   if [ -n "$1" ] ;
+      then TESTJAVA=$1
+      else fail "no JDK specified on command line!"
+   fi
+   TESTSRC=.
+   TESTCLASSES=.
+   STANDALONE=1;
+fi
+echo "JDK under test is: $TESTJAVA"
+
+#Deal with .class files:
+if [ -n "${STANDALONE}" ] ;
+   then
+   #if standalone, remind user to cd to dir. containing test before running it
+   echo "Just a reminder: cd to the dir containing this test when running it"
+   # then compile all .java files (if there are any) into .class files
+   if [ -a *.java ] ;
+      then echo "Reminder, this test should be in its own directory with all"
+      echo "supporting files it needs in the directory with it."
+      ${COMPILEJAVA}/bin/javac ./*.java ;
+   fi
+   # else in harness so copy all the class files from where jtreg put them
+   # over to the scratch directory this test is running in.
+   else cp ${TESTCLASSES}/*.class . ;
+fi
+
+#if in test harness, then copy the entire directory that the test is in over
+# to the scratch directory.  This catches any support files needed by the test.
+if [ -z "${STANDALONE}" ] ;
+   then cp ${TESTSRC}/*.java .
+fi
+
+#Just before executing anything, make sure it has executable permission!
+chmod 777 ./*
+
+###############  YOUR TEST CODE HERE!!!!!!!  #############
+
+#All files required for the test should be in the same directory with
+# this file.  If converting a standalone test to run with the harness,
+# as long as all files are in the same directory and it returns 0 for
+# pass, you should be able to cut and paste it into here and it will
+# run with the test harness.
+
+# This is an example of running something -- test
+# The stuff below catches the exit status of test then passes or fails
+# this shell test as appropriate ( 0 status is considered a pass here )
+
+echo
+echo ------ PREPARE TEST PLUGIN ---------
+
+# note that we can not use some subdirectory of the
+# scratch dir as the plugin dst dir because the test
+# app have file read permission for all subdirs of the
+# scratch dir
+
+PLUGINDST_DIR=${TMP}/test_ext
+#PLUGINDST_DIR=${TESTJAVA}/lib/ext
+TEST_PLUGIN=dummy.jar
+
+if [ ! -d ${PLUGINDST_DIR} ] ; then
+    mkdir ${PLUGINDST_DIR}
+fi
+
+# remove old service declaration
+if [ -d META-INF ] ; then
+    rm -rf META-INF
+fi
+
+# generate the service declaration
+if [ ! -d META_INF ] ; then
+     mkdir META-INF
+     mkdir META-INF/services
+fi
+
+# add wrong record to the service configuration
+echo "BadReaderPluginSpi" >  META-INF/services/javax.imageio.spi.ImageReaderSpi
+
+echo "DummyReaderPluginSpi" >> META-INF/services/javax.imageio.spi.ImageReaderSpi
+
+
+${TESTJAVA}/bin/jar -cvf ${TEST_PLUGIN} DummyReaderPluginSpi*.class META-INF/services/javax.imageio.spi.ImageReaderSpi
+
+echo ----- TEST PLUGIN IS READY --------
+echo
+echo ----- INSTALL PLUGIN --------
+echo "Install test plugin to ${PLUGINDST_DIR}"
+if [ -f ${PLUGINDST_DIR}/${TEST_PLUGIN} ] ; then
+    echo "Remove old plugin..."
+    rm -f ${PLUGINDST_DIR}/${TEST_PLUGIN}
+fi
+mv -f ${TEST_PLUGIN} ${PLUGINDST_DIR}
+if [ -f ${PLUGINDST_DIR}/${TEST_PLUGIN} ] ; then
+    echo Test plugin is installed.
+else
+    fail "Unable to install test plugin to $PLUGINDST_DIR"
+fi
+echo ----- PLUGIN IS INSTALLED ------
+echo
+echo ----- CLEAN PLUGIN TEMPORARY FILES -----
+rm -rf DummyReaderPluginSpi*.class META-INF
+echo ----- CLEANING IS COMPLETE -------
+echo
+
+
+case "$OS" in
+   CYGWIN* )
+      TEST_CODEBASE=$(cygpath -m ${PWD})
+      TEST_PLUGIN_JAR=$(cygpath -m ${PLUGINDST_DIR}${FILESEP}${TEST_PLUGIN})
+      ;;
+
+   # catch all other OSs
+   * )
+      TEST_CODEBASE=${PWD}
+      TEST_PLUGIN_JAR=${PLUGINDST_DIR}${FILESEP}${TEST_PLUGIN}
+      ;;
+esac
+
+
+# Update policy file to grant read permission
+echo "grant codeBase \"file:${TEST_CODEBASE}\" {" > classpath.policy
+echo " permission java.io.FilePermission \"${TEST_PLUGIN_JAR}\", \"read\";" >> classpath.policy
+echo " permission java.util.PropertyPermission \"test.5076692.property\", \"read\";" >> classpath.policy
+echo "};" >> classpath.policy
+echo "grant codeBase \"file:${TEST_PLUGIN_JAR}\" {" >> classpath.policy
+echo " permission java.util.PropertyPermission \"test.5076692.property\", \"read\";" >> classpath.policy
+echo "};" >> classpath.policy
+
+echo ---------------------
+echo --- Applet policy ---
+echo ---------------------
+cat classpath.policy
+echo ---------------------
+echo
+
+echo -------------------------------
+echo ---  Applet Classpath Test  ---
+echo -------------------------------
+#
+# please note that we need to use "==" in setup of the java.security.policy
+# property in order to overwrite policies defined in the user policy file
+# For more details see:
+#  http://java.sun.com/j2se/1.5.0/docs/guide/security/PolicyFiles.html)
+#
+
+${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ".${PATHSEP}${TEST_PLUGIN_JAR}" \
+    -Djava.security.policy==classpath.policy \
+    -Djava.security.manager IIOPluginTest
+
+status=$?
+
+if [ $status -eq "0" ] ; then
+    pass ""
+else
+    fail "Test failed due to test plugin was not found."
+fi
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/AppletContextTest/DummyReaderPluginSpi.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.imageio.IIOException;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class DummyReaderPluginSpi extends ImageReaderSpi {
+
+    private static String [] writerSpiNames =
+        {"DummyWriterPluginSpi"};
+    public static String[] formatNames = {"test_5076692", "TEST_5076692"};
+    public static String[] entensions = {"test_5076692"};
+    public static String[] mimeType = {"image/test_5076692"};
+
+    private boolean registered = false;
+
+    public DummyReaderPluginSpi() {
+        super("Sun Microsystems, Inc.",
+              "1.0",
+              formatNames,
+              entensions,
+              mimeType,
+              "DummyPluginReader",
+              STANDARD_INPUT_TYPE,
+              writerSpiNames,
+              false,
+              null, null, null, null,
+              false,
+              "",
+              "",
+              null, null);
+    }
+
+    public void onRegistration(ServiceRegistry registry,
+                               Class<?> category) {
+        if (registered) {
+            return;
+        }
+
+        System.getProperty("test.5076692.property", "not found");
+
+        registered = true;
+    }
+
+    public String getDescription(Locale locale) {
+        return "Standard Dummy Image Reader";
+    }
+
+    public boolean canDecodeInput(Object source) throws IOException {
+        return false;
+    }
+
+    public ImageReader createReaderInstance(Object extension)
+        throws IIOException {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/AppletContextTest/IIOPluginTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.imageio.ImageIO;
+
+public class IIOPluginTest {
+
+    public static String[] dummyformatNames = {"test_5076692", "TEST_5076692"};
+    public static String[] dummymimeType = {"image/test_5076692"};
+
+    public static void main(String[] args) {
+        SecurityManager sm = System.getSecurityManager();
+        System.out.println("Sm is " + sm);
+
+        String formatNames[] = ImageIO.getReaderFormatNames();
+        String readerMimeTypes[] = ImageIO.getReaderMIMETypes();
+
+        if (!isPresent(dummyformatNames, formatNames) ||
+            !isPresent(dummymimeType, readerMimeTypes)) {
+            throw new RuntimeException("No test plugin available!");
+        }
+    }
+
+    public static boolean isPresent(String[] t, String[] r) {
+        for (int i=0; i<t.length; i++) {
+            if (!isPresent(t[i], r)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public static boolean isPresent(String s, String[] a) {
+        for (int i=0; i<a.length; i++) {
+            System.out.println(a[i] + " ");
+            if (s.equals(a[i])) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/CreateMemoryCacheOutputStream.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4415456
+ * @summary Tests the ability to create a MemoryCacheImageOutputStream using the
+ *          normal service provider interface mechanisms
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageOutputStream;
+
+public class CreateMemoryCacheOutputStream {
+
+    public static void main(String[] args) {
+        ImageIO.setUseCache(false);
+        OutputStream os = new ByteArrayOutputStream();
+        ImageOutputStream stream = null;
+        try {
+            stream = ImageIO.createImageOutputStream(os);
+        } catch (Exception e) {
+            throw new RuntimeException("Got exception " + e);
+        }
+        if (stream == null) {
+            throw new RuntimeException("Got null stream!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/DeregisterAllSpiTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4835841
+ * @summary This test verifies that we will able to register new SPI after
+ *          deregistration all previously registered SPIs by using
+ *          deregisterAll() method
+ */
+
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+import javax.imageio.stream.ImageInputStream;
+
+public class DeregisterAllSpiTest {
+
+    public DeregisterAllSpiTest() throws Exception {
+        ImageReaderSpi BMPSpi = new BMPImageReaderSPI();
+        IIORegistry.getDefaultInstance().registerServiceProvider(BMPSpi);
+
+        System.out.println("Reader Format Names available in the registry");
+        String formatNames[] = ImageIO.getReaderFormatNames();
+        if( formatNames == null || formatNames.length <= 0) {
+            throw new RuntimeException("No registered ImageReaders!");
+        }
+        for (int x=0; x < formatNames.length; x++) {
+            System.out.println("format "+formatNames[x]);
+        }
+
+        IIORegistry.getDefaultInstance().deregisterAll();
+
+        System.out.println("\nReader Format Names after deregistering all SPIs");
+        formatNames = ImageIO.getReaderFormatNames();
+        if(formatNames.length == 0) {
+            System.out.println("No readers available\n");
+        } else {
+            throw new RuntimeException("Some providers was not deregistered!");
+        }
+
+        IIORegistry.getDefaultInstance().registerServiceProvider(BMPSpi);
+        System.out.println("Reader Format Names after re-register of BMP Plugin");
+        formatNames = ImageIO.getReaderFormatNames();
+        if(formatNames.length == 0) {
+            throw new RuntimeException("Unable to register new SPI after deregisterAll()!");
+        }
+    }
+
+
+    public static void main(String args[]) throws Exception{
+        DeregisterAllSpiTest regis = new DeregisterAllSpiTest();
+    }
+
+
+    public static class BMPImageReaderSPI extends javax.imageio.spi.ImageReaderSpi{
+
+        private static final String vendorName = "Javasoft";
+
+        private static final String version = "2.0";
+
+        private static final String[] names = { "bmp" };
+
+        private static final String[] suffixes = { "bmp" };
+
+        private static final String[] MIMETypes = { "image/x-bmp"};
+
+        private static final String readerClassName =
+        "com.sun.imageio.plugins.png.PNGImageReader";
+
+        private static final String[] writerSpiNames = {
+            "com.sun.imageio.plugins.png.PNGImageWriterSpi"
+        };
+
+        public BMPImageReaderSPI() {
+            super(vendorName,
+                  version,
+                  names,
+                  suffixes,
+                  MIMETypes,
+                  readerClassName,
+                  STANDARD_INPUT_TYPE,
+                  writerSpiNames,
+                  false,
+                  null, null,
+                  null, null,
+                  true,
+                  "BMP Native Metadata",
+                  "com.sun.imageio.plugins.png.PNGMetadataFormat",
+                  null, null
+                  );
+        }
+
+        public String getDescription(Locale locale) {
+            return "Standard BMP image reader";
+        }
+
+        public boolean canDecodeInput(Object input) throws IOException {
+            if (!(input instanceof ImageInputStream)) {
+                return false;
+            }
+
+            ImageInputStream stream = (ImageInputStream)input;
+            byte[] b = new byte[8];
+            stream.mark();
+            stream.readFully(b);
+            stream.reset();
+
+            return (b[0] == (byte)137 &&
+                    b[1] == (byte)80 &&
+                    b[2] == (byte)78 &&
+                    b[3] == (byte)71 &&
+                    b[4] == (byte)13 &&
+                    b[5] == (byte)10 &&
+                    b[6] == (byte)26 &&
+                    b[7] == (byte)10);
+        }
+
+        public ImageReader createReaderInstance(Object extension) {
+            //return new PNGImageReader(this);
+            return null;
+        }
+        public void onRegistration(ServiceRegistry sr, Class<?> category) {
+            System.out.println("\nfrom OnRegistration: BMP plugin Registered\n");
+            super.onRegistration(sr, category);
+        }
+
+        public void onDeregistration(ServiceRegistry sr, Class<?> category) {
+            System.out.println("\nfrom OnDeregistration: BMP plugin De-Registered\n");
+            //super.onRegistration(sr, category);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/DeregisterOrderedSpiTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4936495 8037743
+ * @summary This test verifies whether deregistering an ordered spi object does
+ *          not throw any exception
+ * @modules java.desktop/com.sun.imageio.plugins.bmp
+ *          java.desktop/com.sun.imageio.plugins.gif
+ *          java.desktop/com.sun.imageio.plugins.jpeg
+ *          java.desktop/com.sun.imageio.plugins.png
+ */
+
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class DeregisterOrderedSpiTest {
+
+     public DeregisterOrderedSpiTest() {
+
+         try {
+
+             ServiceRegistry reg = IIORegistry.getDefaultInstance();
+             ImageReaderSpi gifSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.gif.GIFImageReaderSpi.class);
+             ImageReaderSpi pngSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.png.PNGImageReaderSpi.class);
+             ImageReaderSpi jpgSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi.class);
+             ImageReaderSpi bmpSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.bmp.BMPImageReaderSpi.class);
+
+             boolean ordered = reg.setOrdering(ImageReaderSpi.class, pngSpi,
+                                               gifSpi);
+
+             ordered = reg.setOrdering(ImageReaderSpi.class, gifSpi, jpgSpi);
+             ordered = reg.setOrdering(ImageReaderSpi.class, bmpSpi, gifSpi);
+             reg.deregisterServiceProvider(gifSpi);
+             System.out.println("PASS");
+
+         } catch (Exception e) {
+             System.out.println("FAIL");
+             throw new RuntimeException("Deregistering a spi object involved in some "
+                                        + "ordering throws the following exception: " + e.toString());
+         }
+     }
+
+     public static void main(String args[]) {
+         DeregisterOrderedSpiTest test = new DeregisterOrderedSpiTest();
+     }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/OrderingTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4936445
+ * @summary This test verifies whether setting the order reversely between 2 spi
+ *          objects removes the previous ordering that was set between the
+ *          same set of spi objects. This is verified by invoking
+ *          unsetOrdering() method twice consecutively with respect to the same
+ *          spi objects and unsetOrdering() is supposed to return false when
+ *          called for the second time.
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ *          java.desktop/com.sun.imageio.plugins.png
+ */
+
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class OrderingTest {
+
+    public OrderingTest() {
+
+         ServiceRegistry reg = IIORegistry.getDefaultInstance();
+         ImageReaderSpi gifSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.gif.GIFImageReaderSpi.class);
+         ImageReaderSpi pngSpi = (ImageReaderSpi) reg.getServiceProviderByClass(com.sun.imageio.plugins.png.PNGImageReaderSpi.class);
+
+         boolean ordered = reg.setOrdering(ImageReaderSpi.class, gifSpi, pngSpi);
+
+         ordered = reg.setOrdering(ImageReaderSpi.class, pngSpi, gifSpi);
+
+         boolean unordered = reg.unsetOrdering(ImageReaderSpi.class, gifSpi,
+                                               pngSpi);
+         boolean unordered1 = reg.unsetOrdering(ImageReaderSpi.class, gifSpi,
+                                                pngSpi);
+
+         if (unordered1) {
+             throw new RuntimeException("FAIL: Ordering 2 spi objects in the  "
+                                        + "reverse direction does not remove the previous ordering "
+                                        + "set between the spi objects and hence unsetOrdering() "
+                                        + "returns true for the same spi objects when called consecutively");
+         } else {
+             System.out.println("PASS");
+         }
+
+     }
+
+     public static void main(String args[]) {
+         OrderingTest test = new OrderingTest();
+     }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/PluginSpiTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6275112
+ * @summary Test verifies that imageReaders for base image formats return
+ *          meaningful name of service provider interface (SPI) for base image
+ *          formats
+ * @modules java.desktop/com.sun.imageio.plugins.gif
+ *          java.desktop/com.sun.imageio.plugins.png
+ *          java.desktop/com.sun.imageio.plugins.jpeg
+ *          java.desktop/com.sun.imageio.plugins.bmp
+ *          java.desktop/com.sun.imageio.plugins.wbmp
+ */
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.ImageReaderSpi;
+
+public class PluginSpiTest {
+
+    public static void main(String[] args) {
+        String format[] = { "GIF", "PNG", "JPEG", "BMP", "WBMP" };
+        for (int i = 0; i < format.length; i++) {
+            System.out.println("\nFormat " + format[i]);
+            testFormat(format[i]);
+        }
+    }
+
+    public static void testFormat(String format) {
+        ImageReader reader =
+            ImageIO.getImageReadersByFormatName(format).next();
+        if (reader == null) {
+            throw new RuntimeException("Failed to get reader for " + format);
+        }
+
+        ImageReaderSpi readerSpi = reader.getOriginatingProvider();
+        System.out.println(format + " Reader SPI: " + readerSpi);
+
+        String writerSpiNames[] = readerSpi.getImageWriterSpiNames();
+        if (writerSpiNames == null || writerSpiNames.length == 0) {
+            throw new RuntimeException("Failed to get writer spi names for " +
+                                       format);
+        }
+
+        System.out.println("Available writer spi names:");
+        for (int i = 0; i < writerSpiNames.length; i++) {
+            System.out.println(writerSpiNames[i]);
+            try {
+                Class spiClass = Class.forName(writerSpiNames[i]);
+                if (spiClass == null) {
+                    throw new RuntimeException("Failed to get spi class " +
+                                               writerSpiNames[i]);
+                }
+                System.out.println("Got class " + spiClass.getName());
+
+                Object spiObject = spiClass.newInstance();
+                if (spiObject == null) {
+                    throw new RuntimeException("Failed to instantiate spi " +
+                                               writerSpiNames[i]);
+                }
+                System.out.println("Got instance " + spiObject);
+            } catch (Throwable e) {
+                throw new RuntimeException("Failed to test spi " +
+                                           writerSpiNames[i]);
+            }
+        }
+
+        ImageWriter writer = ImageIO.getImageWriter(reader);
+        if (writer == null) {
+            throw new RuntimeException("Failed to get writer for " + format);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/RegisterPluginTwiceTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4836432 8037743
+ * @summary This test attempts to register two instances of one ImageReaderSPI.
+ *          Expected behavior is that only one instance of ImageReaderSPI will
+ *          be registered.
+ */
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Locale;
+
+import javax.imageio.ImageReader;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.ServiceRegistry;
+import javax.imageio.stream.ImageInputStream;
+
+public class RegisterPluginTwiceTest {
+
+    public RegisterPluginTwiceTest() throws Exception {
+        BMPImageReaderSPI BMPSpi = new BMPImageReaderSPI();
+        BMPImageReaderSPI BMPSpi1 = new BMPImageReaderSPI();
+
+        IIORegistry regis = IIORegistry.getDefaultInstance();
+        boolean res1
+            = regis.registerServiceProvider(BMPSpi,
+                                            javax.imageio.spi.ImageReaderSpi.class);
+        boolean res2
+            = regis.registerServiceProvider(BMPSpi1,
+                                            javax.imageio.spi.ImageReaderSpi.class);
+
+        if(!res1 || res2) {
+            throw new RuntimeException("Bad returned values for registerServiceProvider");
+        }
+        Iterator it = regis.getServiceProviders(Class.forName("javax.imageio.spi.ImageReaderSpi"), true);
+        int count = 0;
+        while (it.hasNext()) {
+            Object o = it.next();
+            if(o instanceof BMPImageReaderSPI) {
+                count++;
+                System.out.println("Found next BMPImageReaderSPI, count = " +count);
+            }
+        }
+        if(count > 1) {
+            throw new RuntimeException("Too many instances of the BMPImageReaderSPI was registered!");
+        }
+    }
+
+    public static void main(String args[]) throws Exception{
+        RegisterPluginTwiceTest fnio = new RegisterPluginTwiceTest();
+    }
+
+
+ /**
+  Not a perfect implementation of SPI. This is just a dummy implementation
+  which denotes some arbitrary reader class. The intention is to check how this
+  is getting registered in the registry. Hence some of the values in this class
+  may be inappropriate..
+ */
+    public static class BMPImageReaderSPI extends javax.imageio.spi.ImageReaderSpi{
+
+        private static final String vendorName = "Javasoft";
+
+        private static final String version = "2.0";
+
+        private static final String[] names = { "bmp" };
+
+        private static final String[] suffixes = { "bmp" };
+
+        private static final String[] MIMETypes = { "image/x-bmp"};
+
+        private static final String readerClassName =
+        "com.sun.imageio.plugins.png.PNGImageReader";
+
+        private static final String[] writerSpiNames = {
+            "com.sun.imageio.plugins.png.PNGImageWriterSpi"
+        };
+
+        public BMPImageReaderSPI() {
+            super(vendorName,
+                  version,
+                  names,
+                  suffixes,
+                  MIMETypes,
+                  readerClassName,
+                  STANDARD_INPUT_TYPE,
+                  writerSpiNames,
+                  false,
+                  null, null,
+                  null, null,
+                  true,
+                  "BMP Native Metadata",
+                  "com.sun.imageio.plugins.png.PNGMetadataFormat",
+                  null, null
+                  );
+        }
+
+        public String getDescription(Locale locale) {
+            return "Standard BMP image reader";
+        }
+
+        public boolean canDecodeInput(Object input) throws IOException {
+            if (!(input instanceof ImageInputStream)) {
+                return false;
+            }
+
+            ImageInputStream stream = (ImageInputStream)input;
+            byte[] b = new byte[8];
+            stream.mark();
+            stream.readFully(b);
+            stream.reset();
+
+            return (b[0] == (byte)137 &&
+                    b[1] == (byte)80 &&
+                    b[2] == (byte)78 &&
+                    b[3] == (byte)71 &&
+                    b[4] == (byte)13 &&
+                    b[5] == (byte)10 &&
+                    b[6] == (byte)26 &&
+                    b[7] == (byte)10);
+        }
+
+        public ImageReader createReaderInstance(Object extension) {
+            //return new PNGImageReader(this);
+            return null;
+        }
+        public void onRegistration(ServiceRegistry sr, Class<?> category) {
+            //System.out.println("Registered "+category);
+            super.onRegistration(sr, category);
+        }
+
+        public void onDeregistration(ServiceRegistry sr, Class<?> category) {
+            //System.out.println("De-Registered "+category);
+            //super.onRegistration(sr, category);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/SpiTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,390 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4395376
+ * @summary Performs various sanity checks on Spi class constructors and get
+ *          methods
+ */
+
+import java.util.Iterator;
+import java.util.Locale;
+
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.ImageWriter;
+import javax.imageio.spi.IIORegistry;
+import javax.imageio.spi.IIOServiceProvider;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.spi.ImageReaderWriterSpi;
+import javax.imageio.spi.ImageWriterSpi;
+import javax.imageio.spi.ServiceRegistry;
+
+public class SpiTest {
+
+    String vendorName = null;
+    String version = null;
+    String[] names = null;
+    String[] suffixes = null;
+    String[] MIMETypes = null;
+    String readerClassName = null;
+    String writerClassName = null;
+    Class[] inputTypes = null;
+    Class[] outputTypes = null;
+    String[] writerSpiNames = null;
+    String[] readerSpiNames = null;
+    String nativeStreamMetadataFormatName = null;
+    String nativeStreamMetadataFormatClassName = null;
+    String[] extraStreamMetadataFormatNames = null;
+    String[] extraStreamMetadataFormatClassNames = null;
+    String nativeImageMetadataFormatName = null;
+    String nativeImageMetadataFormatClassName = null;
+    String[] extraImageMetadataFormatNames = null;
+    String[] extraImageMetadataFormatClassNames = null;
+
+    private void error(String message) {
+        // System.out.println("Error: " + message);
+        throw new RuntimeException(message);
+    }
+
+    private void testSpi(IIOServiceProvider spi) {
+        if (spi.getVendorName() == null) {
+            error(spi + " getVendorName == null!");
+        }
+        if (spi.getVersion() == null) {
+            error(spi + " getVersion == null!");
+        }
+    }
+
+    private void testSpi(ImageReaderWriterSpi spi) {
+        testSpi((IIOServiceProvider)spi);
+        if (spi.getFormatNames() == null) {
+            error("spi.getFormatNames == null!");
+        }
+        String[] suffixes = spi.getFileSuffixes();
+        if (suffixes != null && suffixes.length == 0) {
+            error("suffixes.length == 0!");
+        }
+        String[] MIMETypes = spi.getMIMETypes();
+        if (MIMETypes != null && MIMETypes.length == 0) {
+            error("MIMETypes.length == 0!");
+        }
+        if (spi.getPluginClassName() == null) {
+            error("spi.getPluginClassName == null!");
+        }
+        String[] extraStreamMetadataFormatNames =
+            spi.getExtraStreamMetadataFormatNames();
+        if (extraStreamMetadataFormatNames != null &&
+            extraStreamMetadataFormatNames.length == 0) {
+            error("extraStreamMetadataFormatNames.length == 0!");
+        }
+        String[] extraImageMetadataFormatNames =
+            spi.getExtraImageMetadataFormatNames();
+        if (extraImageMetadataFormatNames != null &&
+            extraImageMetadataFormatNames.length == 0) {
+            error("extraImageMetadataFormatNames.length == 0!");
+        }
+    }
+
+    public void testSpi(ImageReaderSpi spi) {
+        testSpi((ImageReaderWriterSpi)spi);
+        Class[] inputTypes = spi.getInputTypes();
+        if (inputTypes == null) {
+            error("inputTypes == null!");
+        }
+        if (inputTypes.length == 0) {
+            error("inputTypes.length == 0!");
+        }
+        String[] writerSpiNames = spi.getImageWriterSpiNames();
+        if (writerSpiNames != null && writerSpiNames.length == 0) {
+            error("writerSpiNames.length == 0!");
+        }
+    }
+
+    public void testSpi(ImageWriterSpi spi) {
+        testSpi((ImageReaderWriterSpi)spi);
+        Class[] outputTypes = spi.getOutputTypes();
+        if (outputTypes == null) {
+            error("outputTypes == null!");
+        }
+        if (outputTypes.length == 0) {
+            error("outputTypes.length == 0!");
+        }
+        String[] readerSpiNames = spi.getImageReaderSpiNames();
+        if (readerSpiNames != null && readerSpiNames.length == 0) {
+            error("readerSpiNames.length == 0!");
+        }
+    }
+
+    private void resetConstructorArguments() {
+        vendorName = null;
+        version = null;
+        names = null;
+        suffixes = null;
+        MIMETypes = null;
+        readerClassName = null;
+        inputTypes = null;
+        outputTypes = null;
+        writerSpiNames = null;
+        readerSpiNames = null;
+        nativeStreamMetadataFormatName = null;
+        nativeStreamMetadataFormatClassName = null;
+        extraStreamMetadataFormatNames = null;
+        extraStreamMetadataFormatClassNames = null;
+        nativeImageMetadataFormatName = null;
+        nativeImageMetadataFormatClassName = null;
+        extraImageMetadataFormatNames = null;
+        extraImageMetadataFormatClassNames = null;
+    }
+
+    private ImageReaderSpi constructImageReaderSpi() {
+        return new ImageReaderSpi(vendorName,
+                                  version,
+                                  names,
+                                  suffixes,
+                                  MIMETypes,
+                                  readerClassName,
+                                  inputTypes,
+                                  writerSpiNames,
+                                  false,
+                                  nativeStreamMetadataFormatName,
+                                  nativeStreamMetadataFormatClassName,
+                                  extraStreamMetadataFormatNames,
+                                  extraStreamMetadataFormatClassNames,
+                                  false,
+                                  nativeImageMetadataFormatName,
+                                  nativeImageMetadataFormatClassName,
+                                  extraImageMetadataFormatNames,
+                                  extraImageMetadataFormatClassNames) {
+
+                public String getDescription(Locale locale) {
+                    return null;
+                }
+
+                public boolean canDecodeInput(Object source) {
+                    return false;
+                }
+
+                public ImageReader createReaderInstance(Object extension) {
+                    return null;
+                }
+         };
+    }
+
+    private ImageWriterSpi constructImageWriterSpi() {
+        return new ImageWriterSpi(vendorName,
+                                  version,
+                                  names,
+                                  suffixes,
+                                  MIMETypes,
+                                  writerClassName,
+                                  outputTypes,
+                                  readerSpiNames,
+                                  false,
+                                  nativeStreamMetadataFormatName,
+                                  nativeStreamMetadataFormatClassName,
+                                  extraStreamMetadataFormatNames,
+                                  extraStreamMetadataFormatClassNames,
+                                  false,
+                                  nativeImageMetadataFormatName,
+                                  nativeImageMetadataFormatClassName,
+                                  extraImageMetadataFormatNames,
+                                  extraImageMetadataFormatClassNames) {
+
+                public String getDescription(Locale locale) {
+                    return null;
+                }
+
+                public boolean canEncodeImage(ImageTypeSpecifier type) {
+                    return false;
+                }
+
+                public ImageWriter createWriterInstance(Object extension) {
+                    return null;
+                }
+         };
+    }
+
+    private void checkImageReaderSpiConstructor(boolean shouldFail) {
+        boolean gotIAE = false;
+        try {
+            constructImageReaderSpi();
+        } catch (Exception e) {
+            if (!(e instanceof IllegalArgumentException)) {
+                error("Got exception " + e);
+            } else {
+                gotIAE = true;
+            }
+        }
+        if (gotIAE != shouldFail) {
+            if (gotIAE) {
+                error("ImageReaderSpi constructor threw an IAE!");
+            } else {
+                error("ImageReaderSpi constructor didn't throw an IAE!");
+            }
+        }
+    }
+
+    private void checkImageWriterSpiConstructor(boolean shouldFail) {
+        boolean gotIAE = false;
+        try {
+            constructImageWriterSpi();
+        } catch (Exception e) {
+            if (!(e instanceof IllegalArgumentException)) {
+                error("Got exception " + e);
+            } else {
+                gotIAE = true;
+            }
+        }
+        if (gotIAE != shouldFail) {
+            if (gotIAE) {
+                error("ImageWriterSpi constructor threw an IAE!");
+            } else {
+                error("ImageWriterSpi constructor didn't throw an IAE!");
+            }
+        }
+    }
+
+    public void testImageReaderSpiConstructor() {
+        resetConstructorArguments();
+
+        checkImageReaderSpiConstructor(true);
+        vendorName = "My Vendor";
+        checkImageReaderSpiConstructor(true);
+        version = "My Version";
+        checkImageReaderSpiConstructor(true);
+        names = new String[0];
+        checkImageReaderSpiConstructor(true);
+        names = new String[1];
+        names[0] = "My Format Name";
+        checkImageReaderSpiConstructor(true);
+        readerClassName = "com.mycompany.Reader";
+        checkImageReaderSpiConstructor(true);
+        inputTypes = new Class[0];
+        checkImageReaderSpiConstructor(true);
+        inputTypes = new Class[1];
+        inputTypes[0] = Object.class;
+        // Now it should work
+        checkImageReaderSpiConstructor(false);
+
+        // Test normalization of zero-length arrays
+        suffixes = new String[0];
+        MIMETypes = new String[0];
+        writerSpiNames = new String[0];
+        extraStreamMetadataFormatNames = new String[0];
+        extraImageMetadataFormatNames = new String[0];
+
+        ImageReaderSpi spi = constructImageReaderSpi();
+        if (spi.getFileSuffixes() != null) {
+            error("Failed to normalize suffixes!");
+        }
+        if (spi.getMIMETypes() != null) {
+            error("Failed to normalize MIMETypes!");
+        }
+        if (spi.getImageWriterSpiNames() != null) {
+            error("Failed to normalize writerSpiNames!");
+        }
+        if (spi.getExtraStreamMetadataFormatNames() != null) {
+            error("Failed to normalize extraStreamMetadataFormatNames!");
+        }
+        if (spi.getExtraImageMetadataFormatNames() != null) {
+            error("Failed to normalize extraImageMetadataFormatNames!");
+        }
+    }
+
+    public void testImageWriterSpiConstructor() {
+        resetConstructorArguments();
+
+        checkImageWriterSpiConstructor(true);
+        vendorName = "My Vendor";
+        checkImageWriterSpiConstructor(true);
+        version = "My Version";
+        checkImageWriterSpiConstructor(true);
+        names = new String[0];
+        checkImageWriterSpiConstructor(true);
+        names = new String[1];
+        names[0] = "My Format Name";
+        checkImageWriterSpiConstructor(true);
+        writerClassName = "com.mycompany.Writer";
+        checkImageWriterSpiConstructor(true);
+        outputTypes = new Class[0];
+        checkImageWriterSpiConstructor(true);
+        outputTypes = new Class[1];
+        outputTypes[0] = Object.class;
+        // Now it should work
+        checkImageWriterSpiConstructor(false);
+
+        // Test normalization of zero-length arrays
+        suffixes = new String[0];
+        MIMETypes = new String[0];
+        readerSpiNames = new String[0];
+        extraStreamMetadataFormatNames = new String[0];
+        extraStreamMetadataFormatClassNames = new String[0];
+        extraImageMetadataFormatNames = new String[0];
+        extraImageMetadataFormatClassNames = new String[0];
+
+        ImageWriterSpi spi = constructImageWriterSpi();
+        if (spi.getFileSuffixes() != null) {
+            error("Failed to normalize suffixes!");
+        }
+        if (spi.getMIMETypes() != null) {
+            error("Failed to normalize MIMETypes!");
+        }
+        if (spi.getImageReaderSpiNames() != null) {
+            error("Failed to normalize readerSpiNames!");
+        }
+        if (spi.getExtraStreamMetadataFormatNames() != null) {
+            error("Failed to normalize extraStreamMetadataFormatNames!");
+        }
+        if (spi.getExtraImageMetadataFormatNames() != null) {
+            error("Failed to normalize extraImageMetadataFormatNames!");
+        }
+    }
+
+    public SpiTest() {
+        testImageReaderSpiConstructor();
+        testImageWriterSpiConstructor();
+
+        ServiceRegistry registry = IIORegistry.getDefaultInstance();
+        Iterator readers = registry.getServiceProviders(ImageReaderSpi.class,
+                                                        false);
+        while (readers.hasNext()) {
+            ImageReaderSpi rspi = (ImageReaderSpi)readers.next();
+            System.out.println("*** Testing " + rspi.getClass().getName());
+            testSpi(rspi);
+        }
+
+        Iterator writers = registry.getServiceProviders(ImageWriterSpi.class,
+                                                        false);
+        while (writers.hasNext()) {
+            ImageWriterSpi wspi = (ImageWriterSpi)writers.next();
+            System.out.println("*** Testing " + wspi.getClass().getName());
+            testSpi(wspi);
+        }
+    }
+
+    public static void main(String[] args) {
+        new SpiTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/spi/SpiVersionNumbers.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4415450
+ * @summary Checks the version number for the standard stream Spis
+ * @modules java.desktop/com.sun.imageio.spi
+ */
+
+import javax.imageio.spi.IIOServiceProvider;
+
+import com.sun.imageio.spi.FileImageInputStreamSpi;
+import com.sun.imageio.spi.FileImageOutputStreamSpi;
+import com.sun.imageio.spi.InputStreamImageInputStreamSpi;
+import com.sun.imageio.spi.OutputStreamImageOutputStreamSpi;
+import com.sun.imageio.spi.RAFImageInputStreamSpi;
+import com.sun.imageio.spi.RAFImageOutputStreamSpi;
+
+public class SpiVersionNumbers {
+
+    private static void check(IIOServiceProvider spi) {
+        String version = spi.getVersion();
+        if (!version.equals("1.0")) {
+            throw new RuntimeException("Provider " +
+                                       spi.getClass().getName() +
+                                       " has version " + version + "!");
+        }
+    }
+
+    public static void main(String[] args) {
+        check(new FileImageInputStreamSpi());
+        check(new InputStreamImageInputStreamSpi());
+        check(new RAFImageInputStreamSpi());
+
+        check(new FileImageOutputStreamSpi());
+        check(new OutputStreamImageOutputStreamSpi());
+        check(new RAFImageOutputStreamSpi());
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/BitPadding.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4430395
+ * @summary Checks if write(int) properly pads unwritten bits with zeros
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.stream.FileCacheImageOutputStream;
+
+public class BitPadding {
+
+    public static void main(String[] args) throws IOException {
+        OutputStream ostream = new ByteArrayOutputStream();
+        File f = null;
+        FileCacheImageOutputStream fcios =
+            new FileCacheImageOutputStream(ostream, f);
+        fcios.writeBit(1);
+        fcios.write(96);
+
+        fcios.seek(0);
+        int r1 = fcios.read();
+        if (r1 != 128 ) {
+            throw new RuntimeException("Failed, first byte is " + r1);
+        }
+
+        int r2 = fcios.read();
+        if (r2 != 96) {
+            throw new RuntimeException("Failed, second byte is " + r2);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/DeleteOnExitTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+
+public class DeleteOnExitTest {
+    public static void main(String[] args) throws IOException {
+        ByteArrayInputStream is =
+            new ByteArrayInputStream(new byte[100]);
+        ByteArrayOutputStream os =
+            new ByteArrayOutputStream();
+
+        String tmp = System.getProperty("java.io.tmpdir", ".");
+        System.out.println("tmp: " + tmp);
+
+        // count number of files before test
+        ImageIO.setUseCache(true);
+        ImageIO.setCacheDirectory(new File(tmp));
+
+        File tmpDir = ImageIO.getCacheDirectory();
+        System.out.println("tmpDir is " + tmpDir);
+        int fnum_before = tmpDir.list().length;
+        System.out.println("Files before test: " + fnum_before);
+
+        ImageInputStream iis =
+            ImageIO.createImageInputStream(is);
+        System.out.println("iis = " + iis);
+
+        ImageInputStream iis2 =
+            ImageIO.createImageInputStream(is);
+
+        ImageOutputStream ios =
+            ImageIO.createImageOutputStream(os);
+        System.out.println("ios = " + ios);
+
+        ImageOutputStream ios2 =
+            ImageIO.createImageOutputStream(os);
+
+        iis2.close();
+        ios2.close();
+        int fnum_after = tmpDir.list().length;
+        System.out.println("Files after test: " + fnum_after);
+
+        if (fnum_before == fnum_after) {
+            throw new RuntimeException("Test failed: cache was not used.");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/DeleteOnExitTest.sh	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,69 @@
+# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+
+# @test
+# @bug 6291034
+# @run shell DeleteOnExitTest.sh
+# @summary Verify that temporary imageio files files are deleted on VM exit.
+
+if [ -z "${TESTSRC}" ]; then
+  echo "TESTSRC undefined: defaulting to ."
+  TESTSRC=.
+fi
+
+if [ -z "${TESTCLASSES}" ]; then
+  echo "TESTCLASSES undefined: defaulting to ."
+  TESTCLASSES=.
+fi
+
+if [ -z "${TESTJAVA}" ]; then
+  echo "TESTJAVA undefined: can't continue."
+  exit 1
+fi
+
+echo "TESTJAVA=${TESTJAVA}"
+echo "TESTSRC=${TESTSRC}"
+echo "TESTCLASSES=${TESTCLASSES}"
+cd ${TESTSRC}
+${COMPILEJAVA}/bin/javac -d ${TESTCLASSES} DeleteOnExitTest.java
+
+cd ${TESTCLASSES}
+
+numfiles0=`ls ${TESTCLASSES} | grep "imageio*.tmp" | wc -l`
+
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -Djava.io.tmpdir=${TESTCLASSES} DeleteOnExitTest
+
+if [ $? -ne 0 ]
+    then
+      echo "Test fails: exception thrown!"
+      exit 1
+fi
+
+numfiles1=`ls ${TESTCLASSES} | grep "imageio*.tmp" | wc -l`
+
+if [ $numfiles0 -ne $numfiles1 ]
+    then
+      echo "Test fails: tmp file exists!"
+      exit 1
+fi
+echo "Test passed."
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/FileCacheImageInputStreamNullTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4428802
+ * @summary Checks for IAE from FileCacheImageInputStream constructor with a
+ *          null value for 'stream'
+ */
+
+import javax.imageio.stream.FileCacheImageInputStream;
+
+public class FileCacheImageInputStreamNullTest {
+
+    public static void main (String[] args) throws Exception {
+        boolean gotIAE = false;
+        try {
+            FileCacheImageInputStream fciis =
+                new FileCacheImageInputStream(null, null);
+        } catch (IllegalArgumentException e) {
+            gotIAE = true;
+        }
+
+        if (!gotIAE) {
+            throw new RuntimeException
+                ("Failed to get IllegalArgumentException!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/FlushBefore.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4431503
+ * @summary Checks if flushBefore(pos) throws an IndexOutOfBoundsException if
+ *          pos lies in the flushed portion of the stream
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.imageio.stream.FileCacheImageOutputStream;
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class FlushBefore {
+
+    public static void main(String[] args) throws IOException {
+        OutputStream ostream = new ByteArrayOutputStream();
+
+        FileCacheImageOutputStream fcios =
+            new FileCacheImageOutputStream(ostream, null);
+        test(fcios);
+
+        MemoryCacheImageOutputStream mcios =
+            new MemoryCacheImageOutputStream(ostream);
+        test(mcios);
+    }
+
+    private static void test(ImageOutputStream ios) throws IOException {
+        try {
+            ios.write(new byte[10], 0, 10);
+            ios.flushBefore(5);
+            ios.flushBefore(4);
+
+            throw new RuntimeException
+                ("Failed to get IndexOutOfBoundsException!");
+        } catch (IndexOutOfBoundsException e) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/MemoryCacheImageOutputStreamTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4417672 4422328
+ * @summary Checks the functionality of MemoryCacheImageOutputStream
+ *          particularly with regard to seeking and flushing
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class MemoryCacheImageOutputStreamTest {
+
+    public static void main(String[] args) throws IOException {
+        try {
+            MemoryCacheImageOutputStream stream =
+                new MemoryCacheImageOutputStream(new ByteArrayOutputStream());
+            stream.write(0);  // or write anything, for that matter
+            stream.flush();
+        } catch (Exception e) {
+            throw new RuntimeException("Error flushing stream: " + e);
+        }
+
+        ByteArrayOutputStream os = new ByteArrayOutputStream();
+        ImageOutputStream ios = new MemoryCacheImageOutputStream(os);
+
+        byte[] b = new byte[30*256];
+        byte byteVal = (byte)0;
+        for (int i = 0; i < b.length; i++) {
+            b[i] = byteVal++;
+        }
+
+        // Write 261,120 bytes
+        for (int i = 0; i < 34; i++) {
+            ios.write(b);
+        }
+        // Scatter 256 values at positions 1000, 2000, ...
+        // Using both write(int) and write(byte[])
+        byte[] buf = new byte[1];
+        for (int i = 0; i < 256; i += 2) {
+            ios.seek(1000*i);
+            ios.write(i);
+
+            ios.seek(1000*(i + 1));
+            buf[0] = (byte)(i + 1);
+            ios.write(buf);
+        }
+
+        // Re-read scattered values
+        for (int i = 0; i < 256; i++) {
+            ios.seek(1000*i);
+            int val = ios.read();
+            if (val != i) {
+                System.out.println("Got bad value (1) at pos = " + (1000*i));
+            }
+        }
+
+        // Discard two buffers and re-read scattered values
+        ios.flushBefore(2*8192);
+
+        for (int i = 0; i < 256; i++) {
+            long pos = 1000*i;
+            if (pos >= 2*8192) {
+                ios.seek(pos);
+                int val = ios.read();
+                if (val != i) {
+                    System.out.println("Got bad value (2) at pos = " + (1000*i));
+                }
+            }
+        }
+        ios.close();
+
+        byte[] data = os.toByteArray();
+        for (int i = 0; i < data.length; i++) {
+            byte val = data[i];
+            if ((i < 256000) && (i % 1000) == 0) {
+                if (val != (byte)(i/1000)) {
+                    System.out.println("Got bad value (3) at pos = " + i);
+                }
+            } else {
+                byte gval = (byte)((i % (30*256)) % 256);
+                if (val != gval) {
+                    System.out.println("Got bad value (4) at pos = " + i +
+                                       "(got " + (val & 0xff) +
+                                       " wanted " + (gval & 0xff) +")");
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/ReadBytesIIOByteBuffer.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4446906
+ * @summary Checks if ImageInputStreamImpl.readBytes(IIOByteBuffer) tests for
+ *          len < 0
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.imageio.stream.IIOByteBuffer;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.MemoryCacheImageInputStream;
+
+public class ReadBytesIIOByteBuffer {
+
+    public static void main(String[] argv) {
+        byte[] bar = {1, 1, 1};
+        InputStream is = new ByteArrayInputStream(bar);
+
+        ImageInputStream iis = new MemoryCacheImageInputStream(is);
+        byte[] b = new byte[10];
+        IIOByteBuffer iiob = new IIOByteBuffer(b, 0, b.length);
+        try {
+            iis.readBytes(iiob, -1);
+        } catch (IndexOutOfBoundsException e) {
+            return;
+        } catch (Exception e) {
+            throw new RuntimeException("Unexpected exception: " + e);
+        }
+        throw new RuntimeException("No exception thrown for len < 0!");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/ReadFullyTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4422263
+ * @summary Checks that ImageInputStream.readFully(type[], int int) handles sign
+ *          extension and byte ordering correctly
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.ByteOrder;
+
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.MemoryCacheImageInputStream;
+
+public class ReadFullyTest {
+
+    static final ByteOrder bigEndian = ByteOrder.BIG_ENDIAN;
+    static final ByteOrder littleEndian = ByteOrder.LITTLE_ENDIAN;
+
+    private static void expect(long e, long g) {
+        if (e != g) {
+            throw new RuntimeException("Expected " + e + ", got " + g);
+        }
+    }
+
+    public static void main (String args[]) {
+        try {
+            byte[] b = {
+                (byte)0x11, (byte)0x22, // low low
+                (byte)0x44, (byte)0x99, // low high
+                (byte)0xAA, (byte)0x33, // high low
+                (byte)0xBB, (byte)0xCC  // high high
+            };
+            InputStream in = new ByteArrayInputStream(b);
+            ImageInputStream iin = new MemoryCacheImageInputStream(in);
+
+            short[] s = new short[b.length/2];
+            char[] c = new char[b.length/2];
+            int[] i = new int[b.length/4];
+            long[] l = new long[b.length/8];
+            float[] f = new float[b.length/4];
+            double[] d = new double[b.length/8];
+
+            iin.seek(0L);
+            iin.setByteOrder(bigEndian);
+            iin.readFully(s, 0, s.length);
+            expect(s[0] & 0xffff, 0x1122);
+            expect(s[1] & 0xffff, 0x4499);
+            expect(s[2] & 0xffff, 0xAA33);
+            expect(s[3] & 0xffff, 0xBBCC);
+
+            iin.seek(0L);
+            iin.setByteOrder(littleEndian);
+            iin.readFully(s, 0, s.length);
+            expect(s[0] & 0xffff, 0x2211);
+            expect(s[1] & 0xffff, 0x9944);
+            expect(s[2] & 0xffff, 0x33AA);
+            expect(s[3] & 0xffff, 0xCCBB);
+
+            iin.seek(0L);
+            iin.setByteOrder(bigEndian);
+            iin.readFully(c, 0, c.length);
+            expect(c[0], 0x1122);
+            expect(c[1], 0x4499);
+            expect(c[2], 0xAA33);
+            expect(c[3], 0xBBCC);
+
+            iin.seek(0L);
+            iin.setByteOrder(littleEndian);
+            iin.readFully(c, 0, c.length);
+            expect(c[0], 0x2211);
+            expect(c[1], 0x9944);
+            expect(c[2], 0x33AA);
+            expect(c[3], 0xCCBB);
+
+            iin.seek(0L);
+            iin.setByteOrder(bigEndian);
+            iin.readFully(i, 0, i.length);
+            expect(i[0] & 0xffffffff, 0x11224499);
+            expect(i[1] & 0xffffffff, 0xAA33BBCC);
+
+            iin.seek(0L);
+            iin.setByteOrder(littleEndian);
+            iin.readFully(i, 0, i.length);
+            expect(i[0] & 0xffffffff, 0x99442211);
+            expect(i[1] & 0xffffffff, 0xCCBB33AA);
+
+            iin.seek(0L);
+            iin.setByteOrder(bigEndian);
+            iin.readFully(f, 0, f.length);
+            expect(Float.floatToIntBits(f[0]) & 0xffffffff, 0x11224499);
+            expect(Float.floatToIntBits(f[1]) & 0xffffffff, 0xAA33BBCC);
+
+            iin.seek(0L);
+            iin.setByteOrder(littleEndian);
+            iin.readFully(f, 0, f.length);
+            expect(Float.floatToIntBits(f[0]) & 0xffffffff, 0x99442211);
+            expect(Float.floatToIntBits(f[1]) & 0xffffffff, 0xCCBB33AA);
+
+            iin.seek(0L);
+            iin.setByteOrder(bigEndian);
+            iin.readFully(l, 0, l.length);
+            expect(l[0], 0x11224499AA33BBCCL);
+
+            iin.seek(0L);
+            iin.setByteOrder(littleEndian);
+            iin.readFully(l, 0, l.length);
+            expect(l[0], 0xCCBB33AA99442211L);
+
+            iin.seek(0L);
+            iin.setByteOrder(bigEndian);
+            iin.readFully(d, 0, d.length);
+            expect(Double.doubleToLongBits(d[0]), 0x11224499AA33BBCCL);
+
+            iin.seek(0L);
+            iin.setByteOrder(littleEndian);
+            iin.readFully(d, 0, d.length);
+            expect(Double.doubleToLongBits(d[0]), 0xCCBB33AA99442211L);
+        } catch (Exception ex) {
+            throw new RuntimeException("Got exception " + ex);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/ReadUnsignedIntTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4949609
+ * @summary Tests that the readUnsignedInt returns the positive value
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageInputStream;
+
+public class ReadUnsignedIntTest {
+
+    public static void main(String[] args) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DataOutputStream dos = new DataOutputStream(baos);
+
+        dos.writeInt(1);
+        dos.writeInt(0x7fffffff);
+        dos.writeInt(0x8fffffff);
+        dos.writeInt(0xffffffff);
+
+        dos.close();
+
+        ByteArrayInputStream bais =
+            new ByteArrayInputStream(baos.toByteArray());
+        ImageInputStream iis = ImageIO.createImageInputStream(bais);
+        for (int i=0; i<4; i++) {
+            long res = iis.readUnsignedInt();
+            if (res <= 0) {
+                throw new RuntimeException("Negative number was read: "+
+                                           Long.toString(res, 16));
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/StreamFlush.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4414990 4415041
+ * @summary Checks that the output is flushed properly when using various
+ *          ImageOutputStreams and writers
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.imageio.stream.ImageOutputStream;
+
+public class StreamFlush {
+
+    public static void main(String[] args) throws IOException {
+        ImageIO.setUseCache(true);
+
+        // Create a FileImageOutputStream from a FileOutputStream
+        File temp1 = File.createTempFile("imageio", ".tmp");
+        temp1.deleteOnExit();
+        ImageOutputStream fios = ImageIO.createImageOutputStream(temp1);
+
+        // Create a FileCacheImageOutputStream from a BufferedOutputStream
+        File temp2 = File.createTempFile("imageio", ".tmp");
+        temp2.deleteOnExit();
+        FileOutputStream fos2 = new FileOutputStream(temp2);
+        BufferedOutputStream bos = new BufferedOutputStream(fos2);
+        ImageOutputStream fcios1 = ImageIO.createImageOutputStream(bos);
+
+        // Create a FileCacheImageOutputStream from a ByteArrayOutputStream
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageOutputStream fcios2 = ImageIO.createImageOutputStream(baos);
+
+        BufferedImage bi =
+            new BufferedImage(10, 10, BufferedImage.TYPE_3BYTE_BGR);
+
+        ImageIO.write(bi, "jpg", fios); // No bug, check it anyway
+        ImageIO.write(bi, "png", fcios1); // Bug 4414990
+        ImageIO.write(bi, "jpg", fcios2); // Bug 4415041
+
+        // It should not be necessary to flush any of the streams
+        // If flushing does make a difference, it indicates a bug
+        // in the writer or the stream implementation
+
+        // Get length of temp1 before and after flushing
+        long file1NoFlushLength = temp1.length();
+        fios.flush();
+        long file1FlushLength = temp1.length();
+
+        // Get length of temp2 before and after flushing
+        long file2NoFlushLength = temp2.length();
+        fcios1.flush();
+        bos.flush();
+        long file2FlushLength = temp2.length();
+
+        byte[] b0 = baos.toByteArray();
+        int cacheNoFlushLength = b0.length;
+        fcios2.flush();
+        byte[] b1 = baos.toByteArray();
+        int cacheFlushLength = b1.length;
+
+        if (file1NoFlushLength != file1FlushLength) {
+            // throw new RuntimeException
+            System.out.println
+                ("FileImageOutputStream not flushed!");
+        }
+
+        if (file2NoFlushLength != file2FlushLength) {
+            // throw new RuntimeException
+            System.out.println
+             ("FileCacheImageOutputStream/BufferedOutputStream not flushed!");
+        }
+
+        if (cacheNoFlushLength != cacheFlushLength) {
+            // throw new RuntimeException
+            System.out.println
+            ("FileCacheImageOutputStream/ByteArrayOutputStream not flushed!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/stream/WriteBitsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4507868
+ * @summary Checks that ImageOutputStreamImpl.writeBits() advances the stream
+ *          position and bit offset correctly. Also verifies that the
+ *          MemoryCacheImageOutputStream.read() variants reset the bitOffset
+ *          before the read actually occurs.
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.imageio.stream.ImageOutputStream;
+import javax.imageio.stream.MemoryCacheImageOutputStream;
+
+public class WriteBitsTest {
+
+    private static void verify(ImageOutputStream ios,
+                               long expstreampos, int expbitoffset)
+        throws IOException, RuntimeException
+    {
+        long actstreampos = ios.getStreamPosition();
+        int actbitoffset = ios.getBitOffset();
+
+        if ((actstreampos != expstreampos) ||
+            (actbitoffset != expbitoffset))
+        {
+            System.err.println("Expected stream position: " + expstreampos +
+                               " Actual: " + actstreampos);
+            System.err.println("Expected bit offset: " + expbitoffset +
+                               " Actual: " + actbitoffset);
+            throw new RuntimeException("Test failed.");
+        }
+    }
+
+    public static void main(String argv[]) throws RuntimeException {
+        ByteArrayOutputStream ostream = new ByteArrayOutputStream();
+        MemoryCacheImageOutputStream mcios = new
+            MemoryCacheImageOutputStream(ostream);
+
+        try {
+            // verify correct writeBits() functionality
+            long streampos = 0;
+            int bitoffset = 0;
+
+            mcios.setBitOffset(bitoffset);
+            verify(mcios, streampos, bitoffset);
+
+            bitoffset = 3;
+            mcios.setBitOffset(bitoffset);
+            verify(mcios, streampos, bitoffset);
+
+            for (int incr = 3; incr <= 15; incr += 12) {
+                for (int i = 0; i < 64; i += incr) {
+                    mcios.writeBits(10, incr);
+
+                    bitoffset += incr;
+
+                    if (bitoffset > 7) {
+                        int stroffset = bitoffset / 8;
+                        bitoffset = bitoffset % 8;
+                        streampos += stroffset;
+                    }
+
+                    verify(mcios, streampos, bitoffset);
+                }
+            }
+
+            // verify correct read(byte[], int, int) functionality
+            byte[] bytearr = new byte[2];
+            mcios.seek(2);
+            mcios.setBitOffset(3);
+            int numread = mcios.read(bytearr, 0, 2);
+            if (numread != 2) {
+                throw new RuntimeException("Error in mcios.read([BII)I");
+            }
+            verify(mcios, 4, 0);
+
+            // verify correct read() functionality
+            mcios.setBitOffset(3);
+            mcios.read();
+            verify(mcios, 5, 0);
+        } catch (IOException e) {
+            throw new RuntimeException("Unexpected IOException: " + e);
+        }
+    }
+}
--- a/jdk/test/javax/security/auth/login/modules/JaasModularClientTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/security/auth/login/modules/JaasModularClientTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -32,14 +32,15 @@
 import java.util.ArrayList;
 import jdk.testlibrary.ProcessTools;
 import jdk.testlibrary.OutputAnalyzer;
+import jdk.test.lib.compiler.CompilerUtils;
 import org.testng.annotations.BeforeTest;
 
 /**
  * @test
  * @bug 8078813
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @library /java/security/modules
- * @build CompilerUtils JarUtils
+ * @build jdk.test.lib.compiler.CompilerUtils JarUtils
  * @summary Test custom JAAS module with all possible modular option. The test
  *          includes different combination of JAAS client/login modules
  *          interaction with or without service description.
--- a/jdk/test/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/security/auth/login/modules/JaasModularDefaultHandlerTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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,6 +30,7 @@
 import java.io.IOException;
 import java.lang.module.ModuleDescriptor;
 import java.util.ArrayList;
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.ProcessTools;
 import jdk.testlibrary.OutputAnalyzer;
 import org.testng.annotations.BeforeTest;
@@ -37,9 +38,9 @@
 /**
  * @test
  * @bug 8151654
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @library /java/security/modules
- * @build CompilerUtils JarUtils
+ * @build jdk.test.lib.compiler.CompilerUtils JarUtils
  * @summary Test custom JAAS callback handler with all possible modular option.
  * @run testng JaasModularDefaultHandlerTest
  */
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class Available {
 
@@ -60,8 +61,6 @@
             assertEquals(avail - 1,readchunk.available());
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -69,10 +68,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class Close {
 
@@ -54,8 +55,6 @@
             reader = new RIFFReader(fis);
             reader.close();
             reader = null;
-
-
         }
         finally
         {
@@ -63,10 +62,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class GetFilePointer {
 
@@ -60,8 +61,6 @@
             assertEquals(p+1,readchunk.getFilePointer());
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -69,10 +68,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class GetSize {
 
@@ -59,8 +60,6 @@
             readchunk.readByte();
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -68,10 +67,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class HasNextChunk {
 
@@ -67,8 +68,6 @@
             assertTrue(!reader.hasNextChunk());
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -76,10 +75,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class Read {
 
@@ -62,7 +63,6 @@
             assertEquals(readchunk.read(), 33);
             fis.close();
             reader = null;
-
         }
         finally
         {
@@ -70,10 +70,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadByte {
 
@@ -62,7 +63,6 @@
             assertEquals((int)reader.readByte(), 33);
             fis.close();
             reader = null;
-
         }
         finally
         {
@@ -70,10 +70,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadByteArrayIntInt {
 
@@ -63,8 +64,6 @@
             assertEquals(readchunk.read(), 3);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -72,10 +71,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadInt {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readInt(), 133);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadLong {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readLong(), 133L);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadShort {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readShort(), (short)133);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadString {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readString(5), "HELLO");
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadUnsignedByte {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readUnsignedByte(), 77);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadUnsignedInt {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readUnsignedInt(), 55377L);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,11 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class ReadUnsignedShort {
 
@@ -61,8 +62,6 @@
             assertEquals(reader.readUnsignedShort(), 377);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -70,10 +69,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import com.sun.media.sound.RIFFReader;
 import com.sun.media.sound.RIFFWriter;
@@ -74,8 +76,6 @@
             assertEquals(readchunk.read(), 44);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -83,10 +83,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,11 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
 
 public class WriteOutputStream {
 
@@ -63,8 +64,6 @@
             assertEquals(readchunk.read(), 33);
             fis.close();
             reader = null;
-
-
         }
         finally
         {
@@ -72,10 +71,7 @@
                 writer.close();
             if(reader != null)
                 reader.close();
-
-            if(tempfile.exists())
-                if(!tempfile.delete())
-                    tempfile.deleteOnExit();
+            Files.delete(Paths.get(tempfile.getAbsolutePath()));
         }
     }
 }
--- a/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,7 @@
         }
     }
 
-    public static void main(final String[] args) {
+    public static void main(final String[] args) throws IOException {
         for (final FormatConversionProvider fcp : load(
                 FormatConversionProvider.class)) {
             System.out.println("fcp = " + fcp);
@@ -139,7 +139,8 @@
      */
     private static void testAfterSaveToStream(final AudioFileWriter afw,
                                               final AudioFileFormat.Type type,
-                                              final AudioInputStream ais) {
+                                              final AudioInputStream ais)
+            throws IOException {
         try {
             final ByteArrayOutputStream out = new ByteArrayOutputStream();
             afw.write(ais, type, out);
@@ -147,7 +148,7 @@
                     out.toByteArray());
             validate(AudioSystem.getAudioInputStream(input).getFrameLength());
         } catch (IllegalArgumentException | UnsupportedAudioFileException
-                | IOException ignored) {
+                ignored) {
         }
     }
 
@@ -156,18 +157,19 @@
      */
     private static void testAfterSaveToFile(final AudioFileWriter afw,
                                             final AudioFileFormat.Type type,
-                                            AudioInputStream ais) {
+                                            AudioInputStream ais)
+            throws IOException {
+        final File temp = File.createTempFile("sound", ".tmp");
         try {
-            final File temp = File.createTempFile("sound", ".tmp");
-            temp.deleteOnExit();
             afw.write(ais, type, temp);
             ais = AudioSystem.getAudioInputStream(temp);
             final long frameLength = ais.getFrameLength();
             ais.close();
-            Files.delete(Paths.get(temp.getAbsolutePath()));
             validate(frameLength);
         } catch (IllegalArgumentException | UnsupportedAudioFileException
-                | IOException ignored) {
+                ignored) {
+        } finally {
+            Files.delete(Paths.get(temp.getAbsolutePath()));
         }
     }
 
--- a/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileReader/ShortHeader.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 import java.io.OutputStream;
 import java.net.URL;
 import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.Arrays;
 
 import javax.sound.sampled.AudioSystem;
@@ -51,14 +52,16 @@
 
     public static void main(final String[] args) throws Exception {
         final File file = Files.createTempFile("audio", "test").toFile();
-        file.deleteOnExit();
-        try (final OutputStream fos = new FileOutputStream(file)) {
-            fos.write(W);
-        }
-
-        testAS(file);
-        for (final AudioFileReader afr : load(AudioFileReader.class)) {
-            testAFR(afr, file);
+        try {
+            try (final OutputStream fos = new FileOutputStream(file)) {
+                fos.write(W);
+            }
+            testAS(file);
+            for (final AudioFileReader afr : load(AudioFileReader.class)) {
+                testAFR(afr, file);
+            }
+        } finally {
+            Files.delete(Paths.get(file.getAbsolutePath()));
         }
     }
 
--- a/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriterCloseInput.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
 import javax.sound.sampled.AudioFileFormat;
 import javax.sound.sampled.AudioFormat;
 import javax.sound.sampled.AudioInputStream;
@@ -89,7 +92,7 @@
             if (isFile) {
                 File f = File.createTempFile("WriterCloseInput" + testTotal, "tmp");
                 AudioSystem.write(inStream, fileType, f);
-                f.delete();
+                Files.delete(Paths.get(f.getAbsolutePath()));
             } else {
                 OutputStream outStream = new NullOutputStream();
                 AudioSystem.write(inStream, fileType, outStream);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/GodMode/JFileChooserTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+ * @test
+ * @bug 8179014
+ * @requires (os.family == "Windows")
+ * @summary Check if JFileChooser crashes with GodMode Directory.
+ * @run main/manual JFileChooserTest
+ */
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.util.concurrent.CountDownLatch;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.TimeUnit;
+import javax.swing.JFileChooser;
+import javax.swing.UIManager;
+
+public class JFileChooserTest {
+
+    public static void main(String args[]) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+        TestUI test = new TestUI(latch);
+        SwingUtilities.invokeAndWait(() -> {
+            try {
+                test.createUI();
+            } catch (Exception ex) {
+                throw new RuntimeException("Exception while creating UI");
+            }
+        });
+
+        boolean status = latch.await(5, TimeUnit.MINUTES);
+
+        if (!status) {
+            System.out.println("Test timed out.");
+        }
+
+        SwingUtilities.invokeAndWait(() -> {
+            try {
+                test.disposeUI();
+            } catch (Exception ex) {
+                throw new RuntimeException("Exception while disposing UI");
+            }
+        });
+
+        if (test.testResult == false) {
+            throw new RuntimeException("Test Failed.");
+        }
+    }
+}
+
+class TestUI {
+
+    private static JFrame mainFrame;
+    private static JPanel mainControlPanel;
+
+    private static JTextArea instructionTextArea;
+
+    private static JPanel resultButtonPanel;
+    private static JButton passButton;
+    private static JButton failButton;
+
+    private static GridBagLayout layout;
+    private final CountDownLatch latch;
+    public boolean testResult = false;
+
+    public TestUI(CountDownLatch latch) throws Exception {
+        this.latch = latch;
+    }
+
+    public final void createUI() throws Exception {
+        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+        mainFrame = new JFrame("JFileChooserTest");
+
+        layout = new GridBagLayout();
+        mainControlPanel = new JPanel(layout);
+        resultButtonPanel = new JPanel(layout);
+
+        GridBagConstraints gbc = new GridBagConstraints();
+
+        // Create Test instructions
+        String instructions
+                = "INSTRUCTIONS:"
+                + "\n 1. Create a new folder on the desktop."
+                + "\n 2. Rename the folder exactly as given below: "
+                + "\n    GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} "
+                + "\n 3. Click on Launch Button. "
+                + "\n    Check if JFileChooser is launched successfully. "
+                + "\n    If yes, close the JFileChooser and click Pass, "
+                + "\n    else Fail. "
+                + "\n 4. Delete the GodMode folder.";
+
+        instructionTextArea = new JTextArea();
+        instructionTextArea.setText(instructions);
+        instructionTextArea.setEnabled(false);
+        instructionTextArea.setDisabledTextColor(Color.black);
+        instructionTextArea.setBackground(Color.white);
+
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
+        mainControlPanel.add(instructionTextArea, gbc);
+        JButton launchButton = new JButton("Launch");
+        launchButton.setActionCommand("Launch");
+        launchButton.addActionListener((ActionEvent e) -> {
+            JFileChooser fileChooser = new JFileChooser();
+            fileChooser.showOpenDialog(null);
+        }
+        );
+
+        gbc.gridx = 0;
+        gbc.gridy = 1;
+        mainControlPanel.add(launchButton, gbc);
+
+        passButton = new JButton("Pass");
+        passButton.setActionCommand("Pass");
+        passButton.addActionListener((ActionEvent e) -> {
+            testResult = true;
+            mainFrame.dispose();
+            latch.countDown();
+
+        });
+        failButton = new JButton("Fail");
+        failButton.setActionCommand("Fail");
+        failButton.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                testResult = false;
+                mainFrame.dispose();
+                latch.countDown();
+            }
+        });
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        resultButtonPanel.add(passButton, gbc);
+        gbc.gridx = 1;
+        gbc.gridy = 0;
+        resultButtonPanel.add(failButton, gbc);
+
+        gbc.gridx = 0;
+        gbc.gridy = 2;
+        mainControlPanel.add(resultButtonPanel, gbc);
+
+        mainFrame.add(mainControlPanel);
+        mainFrame.pack();
+        mainFrame.setVisible(true);
+    }
+
+    public void disposeUI() {
+        mainFrame.setVisible(false);
+        mainFrame.dispose();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFrame/AlwaysOnTop/AlwaysOnTopImeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8179665
+ * @summary [Windows] java.awt.IllegalComponentStateException: component must
+ *          be showing on the screen to determine its location
+ * @run main AlwaysOnTopImeTest
+ */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class AlwaysOnTopImeTest {
+
+    private static JDialog d;
+    private static JFrame f;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeLater(() -> {
+            f = new JFrame();
+            f.setVisible(true);
+            d = new JDialog(f);
+            d.add(new JTextField());
+            d.pack();
+            d.setModal(true);
+            f.setAlwaysOnTop(true);
+            d.setVisible(true);
+            f.setAlwaysOnTop(false);
+        });
+        Robot robot = new Robot();
+        robot.waitForIdle();
+        robot.delay(200);
+        SwingUtilities.invokeAndWait(() -> d.setVisible(false));
+        robot.waitForIdle();
+        robot.delay(200);
+        SwingUtilities.invokeLater(f::dispose);
+    }
+}
--- a/jdk/test/javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java	Wed Jul 05 23:36:51 2017 +0200
@@ -41,7 +41,7 @@
 
 /**
  * @test
- * @bug 8132119 8168992
+ * @bug 8132119 8168992 8169897
  * @author Alexandr Scherbatiy
  * @summary Provide public API for text related methods in SwingBasicGraphicsUtils2
  */
@@ -158,7 +158,9 @@
         }
         g2.dispose();
 
-        float xx = (WIDTH - width / 8) / 2;
+        float xx = BasicGraphicsUtils.getStringWidth(comp, fontMetrices, "A") +
+                BasicGraphicsUtils.getStringWidth(comp, fontMetrices, "O")/2;
+
         checkImageContainsSymbol(buffImage, (int) xx, underlined ? 3 : 2);
     }
 
@@ -285,7 +287,7 @@
                 break;
             }
         }
-        return new Font(fontName, Font.PLAIN, 28);
+        return new Font(fontName, Font.PLAIN, 30);
     }
 
     private static float getLayoutWidth(String text, Font font, NumericShaper shaper) {
@@ -311,6 +313,7 @@
 
     private static void checkImageContainsSymbol(BufferedImage buffImage,
             int x, int intersections) {
+
         int background = BACKGROUND_COLOR.getRGB();
         boolean isBackground = true;
         int backgroundChangesCount = 0;
@@ -321,6 +324,7 @@
                 backgroundChangesCount++;
             }
         }
+
         if (backgroundChangesCount != intersections * 2) {
             throw new RuntimeException("String is not properly drawn!");
         }
--- a/jdk/test/jdk/modules/incubator/DefaultImage.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/jdk/modules/incubator/DefaultImage.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -25,14 +25,13 @@
  * @test
  * @bug 8170859
  * @summary Ensure no incubator modules are resolved by default in the image
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng DefaultImage
  */
 
 import java.io.ByteArrayOutputStream;
-import java.io.IOException;
 import java.io.PrintStream;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -42,6 +41,7 @@
 import java.nio.file.Paths;
 import java.util.function.Consumer;
 import java.util.stream.Stream;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/jdk/modules/incubator/ImageModules.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/jdk/modules/incubator/ImageModules.java	Wed Jul 05 23:36:51 2017 +0200
@@ -28,7 +28,7 @@
  * @library /lib/testlibrary /test/lib
  * @key intermittent
  * @modules jdk.compiler jdk.jartool jdk.jlink
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng/othervm ImageModules
  */
 
@@ -45,6 +45,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.util.FileUtils;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/jdk/test/jdk/modules/scenarios/automaticmodules/RunWithAutomaticModules.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/jdk/modules/scenarios/automaticmodules/RunWithAutomaticModules.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build RunWithAutomaticModules CompilerUtils JarUtils
+ * @build RunWithAutomaticModules jdk.test.lib.compiler.CompilerUtils JarUtils
  *        jdk.testlibrary.ProcessTools
  * @run testng RunWithAutomaticModules
  * @summary Runs tests that make use of automatic modules
@@ -35,6 +35,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.Test;
--- a/jdk/test/jdk/modules/scenarios/container/ContainerTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/jdk/modules/scenarios/container/ContainerTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,12 +23,12 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.jartool/sun.tools.jar
  *          jdk.compiler
  *          jdk.zipfs
  *          java.se
- * @build ContainerTest CompilerUtils jdk.testlibrary.*
+ * @build ContainerTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng ContainerTest
  * @summary Starts a simple container that uses dynamic configurations
  *          and launches two applications in the same VM
@@ -38,6 +38,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
--- a/jdk/test/jdk/modules/scenarios/overlappingpackages/OverlappingPackagesTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/jdk/modules/scenarios/overlappingpackages/OverlappingPackagesTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -23,9 +23,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build OverlappingPackagesTest CompilerUtils jdk.testlibrary.*
+ * @build OverlappingPackagesTest jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng OverlappingPackagesTest
  * @summary Basic test to ensure that startup fails if two or more modules
  *          in the boot Layer have the same package
@@ -36,6 +37,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
--- a/jdk/test/lib/testlibrary/CompilerUtils.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import javax.tools.JavaCompiler;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.StandardLocation;
-import javax.tools.ToolProvider;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * This class consists exclusively of static utility methods for invoking the
- * java compiler.
- */
-
-public final class CompilerUtils {
-    private CompilerUtils() { }
-
-    /**
-     * Compile all the java sources in {@code <source>/**} to
-     * {@code <destination>/**}. The destination directory will be created if
-     * it doesn't exist.
-     *
-     * All warnings/errors emitted by the compiler are output to System.out/err.
-     *
-     * @return true if the compilation is successful
-     *
-     * @throws IOException
-     *         if there is an I/O error scanning the source tree or
-     *         creating the destination directory
-     * @throws UnsupportedOperationException
-     *         if there is no system java compiler
-     */
-    public static boolean compile(Path source, Path destination, String ... options)
-        throws IOException
-    {
-        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-        if (compiler == null) {
-            // no compiler available
-            throw new UnsupportedOperationException("Unable to get system java compiler. " +
-                "Perhaps, jdk.compiler module is not available.");
-        }
-        StandardJavaFileManager jfm = compiler.getStandardFileManager(null, null, null);
-
-        List<Path> sources
-            = Files.find(source, Integer.MAX_VALUE,
-                (file, attrs) -> (file.toString().endsWith(".java")))
-                .collect(Collectors.toList());
-
-        Files.createDirectories(destination);
-        jfm.setLocation(StandardLocation.CLASS_PATH, Collections.EMPTY_LIST);
-        jfm.setLocationFromPaths(StandardLocation.CLASS_OUTPUT,
-                                 Arrays.asList(destination));
-
-        List<String> opts = Arrays.asList(options);
-        JavaCompiler.CompilationTask task
-            = compiler.getTask(null, jfm, null, opts, null,
-                jfm.getJavaFileObjectsFromPaths(sources));
-
-        return task.call();
-    }
-}
--- a/jdk/test/sun/net/www/protocol/jar/B5105410.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/net/www/protocol/jar/B5105410.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,23 +21,43 @@
  * questions.
  */
 
-import java.net.*;
-import java.io.*;
+/**
+ * @test
+ * @bug 5105410
+ * @run main/othervm B5105410
+ * @summary ZipFile$ZipFileInputStream doesn't close handle to zipfile
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
 
 public class B5105410 {
     public static void main (String[] args) throws Exception {
-        URL url = new URL ("jar:file:./foo2.jar!/bar.txt");
-        URLConnection urlc = url.openConnection ();
-        urlc.setUseCaches (false);
+        setup();
+        URL url = new URL("jar:file:./foo2.jar!/bar.txt");
+        URLConnection urlc = url.openConnection();
+        urlc.setUseCaches(false);
         InputStream is = urlc.getInputStream();
         is.read();
         is.close();
-        File file = new File ("foo2.jar");
-        if (!file.delete ()) {
-            throw new RuntimeException ("Could not delete foo2.jar");
+        File file = new File("foo2.jar");
+        if (!file.delete()) {
+            throw new RuntimeException("Could not delete foo2.jar");
         }
         if (file.exists()) {
-            throw new RuntimeException ("foo2.jar still exists");
+            throw new RuntimeException("foo2.jar still exists");
         }
     }
+
+    static void setup() throws IOException {
+        Files.copy(Paths.get(System.getProperty("test.src"), "foo2.jar"),
+                   Paths.get(".", "foo2.jar"), REPLACE_EXISTING);
+    }
 }
+
--- a/jdk/test/sun/net/www/protocol/jar/B5105410.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
-# 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
-# @author Michael McMahon
-# @bug 5105410
-# @summary ZipFile$ZipFileInputStream doesn't close handle to zipfile
-#
-
-OS=`uname -s`
-case "$OS" in
-  SunOS | Linux | Darwin | AIX )
-    PS=":"
-    FS="/"
-    ;;
-  CYGWIN* )
-    PS=";"
-    FS="/"
-    ;;
-  Windows* )
-    PS=";"
-    FS="\\"
-    ;;
-  * )
-    echo "Unrecognized system!"
-    exit 1;
-    ;;
-esac
-
-cp ${TESTSRC}${FS}foo2.jar .
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}${FS}B5105410.java
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} B5105410
-
--- a/jdk/test/sun/net/www/protocol/jar/B6449504.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/net/www/protocol/jar/B6449504.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,63 +24,72 @@
 /**
  * @test
  * @bug 6449504
- * @run shell copyin.sh bar.jar
- * @run main B6449504 caching
- * @run main B6449504 no_caching
+ * @run main/othervm B6449504 caching
+ * @run main/othervm B6449504 no_caching
  * @summary REGRESSION: ZipException throws when try to read a XML file
  */
 
-import java.io.*;
-import java.net.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.JarURLConnection;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
 
 public class B6449504 {
 
     public static void main (String[] args) throws Exception {
-
-        boolean caching = args[0].equals ("caching");
-
-        String dirname = System.getProperty ("test.classes");
-        File f = new File (dirname);
+        setup();
+        boolean caching = args[0].equals("caching");
+        String dirname = System.getProperty("test.classes");
+        File f = new File(dirname);
         dirname = f.toURI().toString();
 
-        String u = "jar:"+ dirname + "/bar.jar";
-        URL url = new URL (u+"!/DoesNotExist.txt");
-        System.out.println ("url = " + url);
+        String u = "jar:" + dirname + "/bar.jar";
+        URL url = new URL(u + "!/DoesNotExist.txt");
+        System.out.println("url = " + url);
         JarURLConnection j1 = (JarURLConnection)url.openConnection();
 
-        URL url2 = new URL (u+"!/test.txt");
-        System.out.println ("url2 = " + url2);
+        URL url2 = new URL(u + "!/test.txt");
+        System.out.println("url2 = " + url2);
         JarURLConnection j2 = (JarURLConnection)url2.openConnection();
 
-        j1.setUseCaches (caching);
-        j2.setUseCaches (caching);
+        j1.setUseCaches(caching);
+        j2.setUseCaches(caching);
 
         /* connecting to j2 opens the jar file but does not read it */
 
-        j2.connect ();
+        j2.connect();
 
         try {
             /* attempt to read a non-existing entry in the jar file
              * shows the bug, where the jar file is closed after the
              * attempt fails.
              */
-            InputStream is = j1.getInputStream ();
+            InputStream is = j1.getInputStream();
         } catch (IOException e) {
-            System.out.println ("Got expected exception from j1 ");
+            System.out.println("Got expected exception from j1 ");
         }
 
         /* If bug present, this will fail because we think the jar
          * is ready to be read, after the connect() above, but we
          * get a ZipException because it has been closed
          */
-        InputStream is = j2.getInputStream ();
-        readAndClose (is);
-        System.out.println ("OK");
+        InputStream is = j2.getInputStream();
+        readAndClose(is);
+        System.out.println("OK");
     }
 
-    static void readAndClose (InputStream is) throws IOException {
+    static void readAndClose(InputStream is) throws IOException {
         while (is.read() != -1) ;
         is.close();
     }
 
+    static void setup() throws IOException {
+        Files.copy(Paths.get(System.getProperty("test.src"), "bar.jar"),
+                   Paths.get(System.getProperty("test.classes"), "bar.jar"),
+                   StandardCopyOption.REPLACE_EXISTING);
+    }
 }
--- a/jdk/test/sun/net/www/protocol/jar/GetContentType.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/net/www/protocol/jar/GetContentType.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 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
@@ -21,18 +21,8 @@
  * questions.
  */
 
-/*
- * @test
- * @bug 4274624
- * @summary  Test JarURLConnection.getContentType would
- *           would return default "content/unknown"
- *
- * @build GetContentType
- * @run shell getcontenttype.sh
- */
-
+import java.io.InputStream;
 import java.net.URL;
-import java.io.InputStream;
 
 public class GetContentType {
     public static void main(String args[]) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4274624
+ * @library /test/lib
+ * @build GetContentType GetContentTypeTest
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.process.*
+ * @run main/othervm GetContentTypeTest
+ * @summary Test JarURLConnection.getContentType would
+ *          would return default "content/unknown"
+ */
+
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.process.ProcessTools;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public class GetContentTypeTest {
+    public static void main(String[] args) throws Throwable {
+        Path resJar = Paths.get(System.getProperty("test.src"),
+                "resource.jar");
+        Path classes = Paths.get(System.getProperty("test.classes"));
+        ProcessTools.executeCommand(
+                JDKToolFinder.getTestJDKTool("java"),
+                "-cp", resJar + File.pathSeparator + classes, "GetContentType")
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .shouldHaveExitValue(0);
+    }
+}
--- a/jdk/test/sun/net/www/protocol/jar/copyin.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#!/bin/ksh
-
-#
-# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-# 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.
-#
-
-echo current directory is `pwd`
-set -x
-for i in $*; do
-    rm -f $TESTCLASSES/$i
-    cp $TESTSRC/$i $TESTCLASSES
-done
--- a/jdk/test/sun/net/www/protocol/jar/getcontenttype.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
-# 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.
-#
-
-#
-
-if [ x"$TESTJAVA" = x ]; then 
-        TESTJAVA=$1 
-        shift 
-fi
-if [ x"$TESTCLASSES" = x ]; then TESTCLASSES=.; fi
-if [ x"$TESTSRC" = x ]; then TESTSRC=.; fi
-
-OS=`uname -s`;
-# Set classpath separator
-case "$OS" in
-        Windows* | CYGWIN* )
-        SEP=";"
-        FS="\\"
-        ;;
-
-        * )
-        SEP=":"
-        FS="/"
-        ;;
-esac
-
-# now start the test
-${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${TESTSRC}${FS}resource.jar${SEP}${TESTCLASSES} GetContentType
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 4361044 4388202 4418643 4523159 4730642
+ * @library /test/lib
+ *          /lib/testlibrary
+ * @modules jdk.compiler
+ * @build src.test.src.TestDriver JarUtils
+ *        jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.process.*
+ * @summary various resource and classloading bugs related to jar files
+ * @run main/othervm TestDriver
+ */
+
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.compiler.CompilerUtils;
+import jdk.test.lib.process.ProcessTools;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+public class TestDriver {
+    public static void main(String[] args) throws Throwable {
+        Path srcDir = Paths.get(System.getProperty("test.src"));
+        Path targetDir = Paths.get(System.getProperty("user.dir"));
+        Path jar1SrcDir = srcDir.resolve("src").resolve("jar1");
+        Path jar1TargetDir =  targetDir.resolve("jar1");
+        Path ectJar1Dir = srcDir.resolve("etc").resolve("jar1");
+        Path jarFile = targetDir.resolve("jar1.jar");
+        Path[]  files= new Path[] {
+                Paths.get("res1.txt"), Paths.get("jar1", "bundle.properties")
+        };
+
+        // Copy files to target directory and change permission
+        for (Path file : files) {
+            Path dest = jar1TargetDir.resolve(file);
+            Files.createDirectories(dest.getParent());
+            Files.copy(ectJar1Dir.resolve(file), dest, REPLACE_EXISTING);
+        }
+
+        // Compile and build jar1.jar
+        ProcessTools.executeCommand("chmod", "-R", "u+w", "./jar1")
+                    .outputTo(System.out)
+                    .errorTo(System.out)
+                    .shouldHaveExitValue(0);
+        CompilerUtils.compile(jar1SrcDir, jar1TargetDir);
+        JarUtils.createJarFile(jarFile, jar1TargetDir);
+
+        // Compile test files
+        CompilerUtils.compile(srcDir.resolve("src").resolve("test"), targetDir);
+
+        // Run tests
+        String java = JDKToolFinder.getTestJDKTool("java");
+        String cp = targetDir.toString() + File.pathSeparator + jarFile;
+        String[] tests = new String[]{"TestBug4361044", "TestBug4523159"};
+        for (String test : tests) {
+            ProcessTools.executeCommand(java, "-cp", cp, test)
+                        .outputTo(System.out)
+                        .errorTo(System.out)
+                        .shouldHaveExitValue(0);
+        }
+    }
+}
--- a/jdk/test/sun/net/www/protocol/jar/jarbug/run.sh	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-# 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 4361044 4388202 4418643 4523159 4730642
-# @summary various resource and classloading bugs related to jar files
-#set -x
-DEST=`pwd`
-
-OS=`uname -s`
-case "$OS" in
-  SunOS | Linux | Darwin | AIX )
-    PS=":"
-    FS="/"
-    CHMOD="${FS}bin${FS}chmod"
-    ;;
-  Windows* )
-    PS=";"
-    FS="\\"
-    CHMOD="chmod"
-    ;;
-  CYGWIN* )
-    PS=";"
-    FS="/"
-    CHMOD="chmod"
-    #
-    # javac does not like /cygdrive produced by `pwd`.
-    #
-    DEST=`cygpath -d ${DEST}`
-    ;;
-  * )
-    echo "Unrecognized system!"
-    exit 1;
-    ;;
-esac
-
-#
-# build jar1
-#
-mkdir -p ${DEST}${FS}jar1
-cd ${TESTSRC}${FS}etc${FS}jar1
-cp -r . ${DEST}${FS}jar1
-${CHMOD} -R u+w ${DEST}${FS}jar1
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
-    ${TESTSRC}${FS}src${FS}jar1${FS}LoadResourceBundle.java
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
-    ${TESTSRC}${FS}src${FS}jar1${FS}GetResource.java
-cd ${DEST}${FS}jar1
-${COMPILEJAVA}${FS}bin${FS}jar ${TESTTOOLVMOPTS} cfM jar1.jar jar1 res1.txt
-mv jar1.jar ..
-#
-# build the test sources and run them
-#
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST} ${TESTSRC}${FS}src${FS}test${FS}*.java
-cd ${DEST}
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} RunAllTests
-result=$?
-if [ "$result" -ne "0" ]; then
-    exit 1
-fi
-rm -rf *
-exit 0
--- a/jdk/test/sun/net/www/protocol/jar/jarbug/src/test/RunAllTests.java	Mon Jun 05 13:45:34 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.
- */
-
-public class RunAllTests {
-        public static void main(String[] args) throws Exception {
-                String[] noArgs = new String[0];
-                TestBug4361044.main(noArgs);
-                TestBug4523159.main(noArgs);
-        }
-}
--- a/jdk/test/sun/net/www/protocol/jar/jarbug/src/test/TestBug4361044.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/net/www/protocol/jar/jarbug/src/test/TestBug4361044.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,9 @@
  * questions.
  */
 
-import java.io.*;
-import java.net.*;
-import java.util.jar.*;
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
 
 /*
  * ResourceBundle from jar not found if jar exists in path
@@ -38,40 +38,17 @@
 public class TestBug4361044 extends JarTest
 {
     public void run(String[] args) throws Exception {
-        if (args.length == 0 ) {  // execute the test in another vm.
-            System.out.println("Test: " + getClass().getName());
-            Process process = Runtime.getRuntime().exec(javaCmd + " TestBug4361044 -test");
-
-            BufferedReader isReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
-            BufferedReader esReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
-            Redirector outRedirector = new Redirector(isReader, System.out);
-            Redirector errRedirector = new Redirector(esReader, System.err);
-
-            (new Thread(outRedirector)).start();
-            (new Thread(errRedirector)).start();
-
-            process.waitFor();
-
-            // Delete any remaining files from the test
-            File testDir = new File(tmpdir + File.separator + getClass().getName());
-            deleteRecursively(testDir);
-
-            if (outRedirector.getHasReadData() || errRedirector.getHasReadData())
-                throw new RuntimeException("Failed: No output should have been received from the process");
-
-        } else {   // run the test.
-            File tmp = createTempDir();
-            try {
-                File dir = new File(tmp, "dir!name");
-                dir.mkdir();
-                File testFile = copyResource(dir, "jar1.jar");
-                URL[] urls = new URL[1];
-                urls[0] = new URL("jar:" + testFile.toURL() + "!/");
-                URLClassLoader loader = new URLClassLoader(urls);
-                loader.loadClass("jar1.LoadResourceBundle").newInstance();
-            } finally {
-                deleteRecursively(tmp);
-            }
+        File tmp = createTempDir();
+        try {
+            File dir = new File(tmp, "dir!name");
+            dir.mkdir();
+            File testFile = copyResource(dir, "jar1.jar");
+            URL[] urls = new URL[1];
+            urls[0] = new URL("jar:" + testFile.toURI().toURL() + "!/");
+            URLClassLoader loader = new URLClassLoader(urls);
+            loader.loadClass("jar1.LoadResourceBundle").newInstance();
+        } finally {
+            deleteRecursively(tmp);
         }
     }
 
--- a/jdk/test/sun/net/www/protocol/jar/jarbug/src/test/TestBug4523159.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/net/www/protocol/jar/jarbug/src/test/TestBug4523159.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,12 @@
  * questions.
  */
 
-import java.io.*;
-import java.net.*;
-import java.util.jar.*;
+import java.io.File;
+import java.net.JarURLConnection;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
 
 /*
  * Issuing a getResourceAsStream() call will throw an exception if:
@@ -40,53 +43,30 @@
 public class TestBug4523159 extends JarTest
 {
     public void run(String[] args) throws Exception {
-        if (args.length == 0 ) {  // execute the test in another vm.
-            System.out.println("Test: " + getClass().getName());
-            Process process = Runtime.getRuntime().exec(javaCmd + " TestBug4523159 -test");
-
-            BufferedReader isReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
-            BufferedReader esReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
-            Redirector outRedirector = new Redirector(isReader, System.out);
-            Redirector errRedirector = new Redirector(esReader, System.err);
-
-            (new Thread(outRedirector)).start();
-            (new Thread(errRedirector)).start();
-
-            process.waitFor();
-
-            // Delete any remaining files from the test
-            File testDir = new File(tmpdir + File.separator + getClass().getName());
-            deleteRecursively(testDir);
-
-            if (outRedirector.getHasReadData() || errRedirector.getHasReadData())
-                throw new RuntimeException("Failed: No output should have been received from the process");
+        File tmp = createTempDir();
+        try {
+            File dir = new File(tmp, "dir!name");
+            dir.mkdir();
+            File testFile = copyResource(dir, "jar1.jar");
 
-        } else { // run the test.
-            File tmp = createTempDir();
-            try {
-                File dir = new File(tmp, "dir!name");
-                dir.mkdir();
-                File testFile = copyResource(dir, "jar1.jar");
+            // Case 1: direct access
+            URL url = new URL("jar:" + testFile.toURI().toURL() + "!/res1.txt");
+            JarURLConnection conn = (JarURLConnection) url.openConnection();
+            JarFile file = conn.getJarFile();
+            JarEntry entry = conn.getJarEntry();
+            byte[] buffer = readFully(file.getInputStream(entry));
+            String str = new String(buffer);
+            if (!str.equals("This is jar 1\n")) {
+                throw (new Exception("resource content invalid"));
+            }
 
-                // Case 1: direct access
-                URL url = new URL("jar:" + testFile.toURL() + "!/res1.txt");
-                JarURLConnection conn = (JarURLConnection) url.openConnection();
-                JarFile file = conn.getJarFile();
-                JarEntry entry = conn.getJarEntry();
-                byte[] buffer = readFully(file.getInputStream(entry));
-                String str = new String(buffer);
-                if (!str.equals("This is jar 1\n")) {
-                    throw(new Exception("resource content invalid"));
-                }
-
-                // Case 2: indirect access
-                URL[] urls = new URL[1];
-                urls[0] = new URL("jar:" + testFile.toURL() + "!/");
-                URLClassLoader loader = new URLClassLoader(urls);
-                loader.loadClass("jar1.GetResource").newInstance();
-            } finally {
-                deleteRecursively(tmp);
-            }
+            // Case 2: indirect access
+            URL[] urls = new URL[1];
+            urls[0] = new URL("jar:" + testFile.toURI().toURL()  + "!/");
+            URLClassLoader loader = new URLClassLoader(urls);
+            loader.loadClass("jar1.GetResource").newInstance();
+        } finally {
+            deleteRecursively(tmp);
         }
     }
 
--- a/jdk/test/sun/security/ssl/DHKeyExchange/UseStrongDHSizes.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/security/ssl/DHKeyExchange/UseStrongDHSizes.java	Wed Jul 05 23:36:51 2017 +0200
@@ -33,6 +33,25 @@
  * @library /javax/net/ssl/templates
  * @summary Negotiated Finite Field Diffie-Hellman Ephemeral Parameters for TLS
  * @run main/othervm UseStrongDHSizes 2048
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe2048 UseStrongDHSizes 2048
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe3072 UseStrongDHSizes 2048
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe4096 UseStrongDHSizes 2048
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe6144 UseStrongDHSizes 2048
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe8192 UseStrongDHSizes 2048
+ * @run main/othervm UseStrongDHSizes 3072
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe3072 UseStrongDHSizes 3072
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe4096 UseStrongDHSizes 3072
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe6144 UseStrongDHSizes 3072
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe8192 UseStrongDHSizes 3072
+ * @run main/othervm UseStrongDHSizes 4096
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe4096 UseStrongDHSizes 4096
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe6144 UseStrongDHSizes 4096
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe8192 UseStrongDHSizes 4096
+ * @run main/othervm UseStrongDHSizes 6144
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe6144 UseStrongDHSizes 6144
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe8192 UseStrongDHSizes 6144
+ * @run main/othervm UseStrongDHSizes 8192
+ * @run main/othervm -Djdk.tls.namedGroups=ffdhe8192 UseStrongDHSizes 8192
  */
 
 import java.io.InputStream;
--- a/jdk/test/sun/security/tools/jarsigner/AltProvider.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/security/tools/jarsigner/AltProvider.java	Wed Jul 05 23:36:51 2017 +0200
@@ -25,7 +25,7 @@
  * @test
  * @bug 4906940 8130302
  * @summary -providerPath, -providerClass, -addprovider, and -providerArg
- * @library /lib/testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  */
 
@@ -33,6 +33,7 @@
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.util.JarUtils;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import java.nio.file.*;
 
--- a/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -26,7 +26,6 @@
  * @bug 8047305 8075618
  * @summary Tests jarsigner tool and JarSigner API work with multi-release JAR files.
  * @library /test/lib
- * @library /lib/testlibrary
  * @run main MVJarSigningTest
  */
 
@@ -59,6 +58,7 @@
 import jdk.test.lib.JDKToolFinder;
 import jdk.test.lib.JDKToolLauncher;
 import jdk.test.lib.Utils;
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
 
--- a/jdk/test/sun/tools/jhsdb/HeapDumpTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/sun/tools/jhsdb/HeapDumpTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -42,6 +42,7 @@
 import jdk.testlibrary.ProcessTools;
 import jdk.test.lib.apps.LingeredApp;
 import jdk.test.lib.Platform;
+import jdk.test.lib.hprof.parser.HprofReader;
 
 public class HeapDumpTest {
 
@@ -93,6 +94,17 @@
         launch(expectedMessage, Arrays.asList(toolArgs));
     }
 
+    public static void printStackTraces(String file) throws IOException {
+        try {
+            String output = HprofReader.getStack(file, 0);
+            if (!output.contains("LingeredAppWithExtendedChars.main")) {
+                throw new RuntimeException("'LingeredAppWithExtendedChars.main' missing from stdout/stderr");
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException("Test ERROR " + ex, ex);
+        }
+    }
+
     public static void testHeapDump() throws IOException {
         File dump = new File("jhsdb.jmap.heap." +
                              System.currentTimeMillis() + ".hprof");
@@ -106,6 +118,8 @@
         assertTrue(dump.exists() && dump.isFile(),
                    "Could not create dump file " + dump.getAbsolutePath());
 
+        printStackTraces(dump.getAbsolutePath());
+
         dump.delete();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/util/calendar/Bug8176160.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ *@test
+ *@bug 8176160
+ *@summary Make sure CalendarSystem.getEra(name) is consistent with getEras()
+ *@modules java.base/sun.util.calendar
+ *@run main/othervm Bug8176160
+ */
+
+import java.util.Arrays;
+import java.util.List;
+import sun.util.calendar.CalendarSystem;
+import sun.util.calendar.Era;
+
+public class Bug8176160 {
+
+    public static void main(String[] args) throws Exception {
+        List.of("gregorian", "japanese", "julian").stream()
+            .map(CalendarSystem::forName)
+            .forEach(cal -> {
+                Era[] eras = cal.getEras();
+                if (eras != null) {
+                    Arrays.stream(eras)
+                        .forEach(era -> {
+                            System.out.printf("cal: %s, era: %s\n", cal, era);
+                            if (cal.getEra(era.getName()) != era) {
+                                throw new RuntimeException("no match");
+                            }
+                        });
+                }
+            });
+    }
+}
--- a/jdk/test/tools/jlink/basic/AllModulePath.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/basic/AllModulePath.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2015, 2016, 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
@@ -24,11 +24,11 @@
 /*
  * @test
  * @summary jlink test of --add-module ALL-MODULE-PATH
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  * @build jdk.testlibrary.ProcessTools
  *        jdk.testlibrary.OutputAnalyzer
- *        CompilerUtils
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng AllModulePath
  */
 
@@ -48,6 +48,7 @@
 import java.util.stream.Stream;
 import java.util.spi.ToolProvider;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.ProcessTools;
 
 import org.testng.annotations.BeforeClass;
--- a/jdk/test/tools/jlink/basic/BasicTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/basic/BasicTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2015, 2016, 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
@@ -25,13 +25,13 @@
  * @test
  * @summary Basic test of jlink to create jmods and images
  * @author Andrei Eremeev
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules java.base/jdk.internal.module
  *          jdk.jlink
  *          jdk.compiler
  * @build jdk.testlibrary.ProcessTools
  *        jdk.testlibrary.OutputAnalyzer
- *        JarUtils CompilerUtils
+ *        JarUtils jdk.test.lib.compiler.CompilerUtils
  * @run main BasicTest
  */
 
@@ -45,6 +45,7 @@
 import java.util.List;
 import java.util.spi.ToolProvider;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.OutputAnalyzer;
 import jdk.testlibrary.ProcessTools;
 
--- a/jdk/test/tools/jlink/bindservices/BindServices.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/bindservices/BindServices.java	Wed Jul 05 23:36:51 2017 +0200
@@ -33,6 +33,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
@@ -42,9 +43,10 @@
 /**
  * @test
  * @bug 8174826
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler jdk.jlink
- * @build BindServices CompilerUtils jdk.testlibrary.ProcessTools
+ * @build BindServices jdk.testlibrary.ProcessTools
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng BindServices
  */
 
--- a/jdk/test/tools/jlink/bindservices/SuggestProviders.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/bindservices/SuggestProviders.java	Wed Jul 05 23:36:51 2017 +0200
@@ -32,6 +32,7 @@
 import java.util.spi.ToolProvider;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -40,9 +41,9 @@
 /**
  * @test
  * @bug 8174826
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.charsets jdk.compiler jdk.jlink
- * @build SuggestProviders CompilerUtils
+ * @build SuggestProviders jdk.test.lib.compiler.CompilerUtils
  * @run testng SuggestProviders
  */
 
--- a/jdk/test/tools/jlink/plugins/ExcludeJmodSectionPluginTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/plugins/ExcludeJmodSectionPluginTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -24,10 +24,10 @@
 /*
  * @test
  * @summary Test --no-man-pages and --no-header-files
- * @library /lib/testlibrary
+ * @library /test/lib
  * @modules jdk.compiler
  *          jdk.jlink
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng ExcludeJmodSectionPluginTest
  */
 
@@ -48,6 +48,7 @@
 import java.util.spi.ToolProvider;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/jdk/test/tools/jlink/plugins/LegalFilePluginTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/plugins/LegalFilePluginTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -25,10 +25,10 @@
  * @test
  * @bug 8169925
  * @summary Validate the license files deduplicated in the image
- * @library /lib/testlibrary
+ * @library /test/lib
  * @modules jdk.compiler
  *          jdk.jlink
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng LegalFilePluginTest
  */
 
@@ -53,6 +53,7 @@
 import java.util.spi.ToolProvider;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
+import jdk.test.lib.compiler.CompilerUtils;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -29,6 +29,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.util.FileUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
@@ -41,7 +42,8 @@
  * @test
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler jdk.jlink
- * @build CompiledVersionTest CompilerUtils jdk.testlibrary.ProcessTools
+ * @build CompiledVersionTest jdk.testlibrary.ProcessTools
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng CompiledVersionTest
  */
 
--- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -32,6 +32,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.util.FileUtils;
 
 import static jdk.testlibrary.ProcessTools.*;
@@ -47,7 +48,8 @@
  * @modules jdk.compiler jdk.jlink
  * @modules java.base/jdk.internal.module
  * @modules java.base/jdk.internal.org.objectweb.asm
- * @build ModuleTargetHelper UserModuleTest CompilerUtils jdk.testlibrary.ProcessTools
+ * @build ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng UserModuleTest
  */
 
--- a/jdk/test/tools/jmod/JmodNegativeTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jmod/JmodNegativeTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -23,10 +23,10 @@
 
 /*
  * @test
- * @library /lib/testlibrary /test/lib
+ * @library /test/lib
  * @modules jdk.compiler
  *          jdk.jlink
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng JmodNegativeTest
  * @summary Negative tests for jmod
  */
@@ -42,6 +42,7 @@
 import java.util.spi.ToolProvider;
 import java.util.zip.ZipOutputStream;
 import jdk.test.lib.util.FileUtils;
+import jdk.test.lib.compiler.CompilerUtils;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
--- a/jdk/test/tools/jmod/JmodTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/jmod/JmodTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -25,10 +25,10 @@
  * @test
  * @bug 8142968 8166568 8166286 8170618 8168149
  * @summary Basic test for jmod
- * @library /lib/testlibrary /test/lib
+ * @library /test/lib
  * @modules jdk.compiler
  *          jdk.jlink
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng/othervm -Djava.io.tmpdir=. JmodTest
  */
 
@@ -41,6 +41,7 @@
 import java.util.regex.Pattern;
 import java.util.spi.ToolProvider;
 import java.util.stream.Stream;
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.util.FileUtils;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
--- a/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/MainClassCantBeLoadedTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 8174694
+ * @bug 8174694 8181033
  * @summary improve error message shown when main class can't be loaded
  * @compile MainClassCantBeLoadedTest.java
  * @run main MainClassCantBeLoadedTest
@@ -85,6 +85,68 @@
             System.err.println(trExecution);
     }
 
+    @Test
+    void testFailToInitializeMainClass() throws Exception {
+        if (!isEnglishLocale()) {
+            return;
+        }
+
+        File cwd = new File(".");
+        File srcDir = new File(cwd, "src");
+        if (srcDir.exists()) {
+            recursiveDelete(srcDir);
+        }
+        srcDir.mkdirs();
+
+        /* we want to generate class C that will resolve additional class
+         */
+        ArrayList<String> scratchpad = new ArrayList<>();
+        scratchpad.add("public class C {");
+        scratchpad.add("    public static void main(String... args) {");
+        scratchpad.add("        try {");
+        scratchpad.add("            System.out.println(\"loading of restricted class\");");
+        scratchpad.add("        } catch (Exception e) {");
+        scratchpad.add("            java.security.Provider p = new com.sun.crypto.provider.SunJCE();");
+        scratchpad.add("            p.toString();");
+        scratchpad.add("        }");
+        scratchpad.add("    }");
+        scratchpad.add("}");
+        createFile(new File(srcDir, "C.java"), scratchpad);
+
+
+        // Compile and execute C should succeed
+        TestResult trCompilation = doExec(javacCmd,
+            "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED",
+            "-d", "out",
+            new File(srcDir, "C.java").toString());
+        if (!trCompilation.isOK()) {
+            System.err.println(trCompilation);
+            throw new RuntimeException("Error: compiling");
+        }
+
+        TestResult trExecution = doExec(javaCmd,
+            "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED",
+            "-cp", "out", "C");
+        if (!trExecution.isOK()) {
+            System.err.println(trExecution);
+            throw new RuntimeException("Error: executing");
+        }
+
+        // Execute C with security manager will fail with AccessControlException
+        trExecution = doExec(javaCmd,
+            "-Djava.security.manager",
+            "--add-exports", "java.base/com.sun.crypto.provider=ALL-UNNAMED",
+            "-cp", "out", "C");
+
+        // then this error message should be generated
+        trExecution.contains("Error: Unable to initialize main class C");
+        trExecution.contains("Caused by: java.security.AccessControlException: " +
+            "access denied (\"java.lang.RuntimePermission\"" +
+            " \"accessClassInPackage.com.sun.crypto.provider\")");
+        if (!trExecution.testStatus)
+            System.err.println(trExecution);
+    }
+
     public static void main(String[] args) throws Exception {
         MainClassCantBeLoadedTest a = new MainClassCantBeLoadedTest();
         a.run(args);
--- a/jdk/test/tools/launcher/modules/addexports/AddExportsTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/addexports/AddExportsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build AddExportsTest CompilerUtils jdk.testlibrary.*
+ * @build AddExportsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng AddExportsTest
  * @summary Basic tests for java --add-exports
  */
@@ -34,6 +34,7 @@
 import java.nio.file.Paths;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.OutputAnalyzer;
 import static jdk.testlibrary.ProcessTools.*;
 
--- a/jdk/test/tools/launcher/modules/addmods/AddModsTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/addmods/AddModsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -23,10 +23,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.jlink/jdk.tools.jmod
  *          jdk.compiler
- * @build AddModsTest CompilerUtils jdk.testlibrary.*
+ * @build AddModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng AddModsTest
  * @summary Basic test for java --add-modules
  */
@@ -35,6 +35,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
--- a/jdk/test/tools/launcher/modules/addreads/AddReadsTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/addreads/AddReadsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -23,9 +23,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build AddReadsTest CompilerUtils JarUtils jdk.testlibrary.*
+ * @build AddReadsTest JarUtils jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng AddReadsTest
  * @summary Basic tests for java --add-reads
  */
@@ -33,6 +34,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.OutputAnalyzer;
 import static jdk.testlibrary.ProcessTools.*;
 
--- a/jdk/test/tools/launcher/modules/basic/BasicTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/basic/BasicTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,11 +23,11 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  *          jdk.jartool
  *          jdk.jlink
- * @build BasicTest CompilerUtils jdk.testlibrary.*
+ * @build BasicTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng BasicTest
  * @summary Basic test of starting an application as a module
  */
@@ -38,6 +38,7 @@
 import java.nio.file.Paths;
 import java.util.spi.ToolProvider;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.ProcessTools;
 
 import org.testng.annotations.BeforeTest;
--- a/jdk/test/tools/launcher/modules/classpath/JavaClassPathTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/classpath/JavaClassPathTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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,6 +30,7 @@
 import java.util.Map;
 import java.util.spi.ToolProvider;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.OutputAnalyzer;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
@@ -42,10 +43,10 @@
  * @test
  * @bug 8168205
  * @summary Test the default class path if -Djava.class.path is set
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  *          jdk.jartool
- * @build CompilerUtils jdk.testlibrary.*
+ * @build jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng JavaClassPathTest
  */
 
--- a/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -24,10 +24,11 @@
 /**
  * @test
  * @bug 8159596
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  *          jdk.jartool
- * @build DryRunTest CompilerUtils jdk.testlibrary.ProcessTools
+ * @build DryRunTest jdk.testlibrary.ProcessTools
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng DryRunTest
  * @summary Test java --dry-run
  */
@@ -39,13 +40,13 @@
 import java.nio.file.Paths;
 import java.util.spi.ToolProvider;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.ProcessTools;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import static org.testng.Assert.*;
 
-
 @Test
 public class DryRunTest {
 
--- a/jdk/test/tools/launcher/modules/limitmods/LimitModsTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/limitmods/LimitModsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules java.desktop java.logging jdk.compiler
- * @build LimitModsTest CompilerUtils jdk.testlibrary.*
+ * @build LimitModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng LimitModsTest
  * @summary Basic tests for java --limit-modules
  */
@@ -33,13 +33,13 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import static org.testng.Assert.*;
 
-
 @Test
 public class LimitModsTest {
 
--- a/jdk/test/tools/launcher/modules/listmods/ListModsTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/listmods/ListModsTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules java.se
- * @build ListModsTest CompilerUtils jdk.testlibrary.*
+ * @build ListModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.*
  * @run testng ListModsTest
  * @summary Basic test for java --list-modules
  */
@@ -33,6 +33,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.testlibrary.ProcessTools;
 import jdk.testlibrary.OutputAnalyzer;
 
--- a/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/patch/basic/PatchTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 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
@@ -23,9 +23,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build PatchTest CompilerUtils JarUtils jdk.testlibrary.*
+ * @build PatchTest JarUtils jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng PatchTest
  * @summary Basic test for --patch-module
  */
@@ -37,13 +38,13 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 import static org.testng.Assert.*;
 
-
 /**
  * Compiles and launches a test that uses --patch-module with two directories
  * of classes to override existing classes and add new classes to modules in
--- a/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/patch/basic/PatchTestWarningError.java	Wed Jul 05 23:36:51 2017 +0200
@@ -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
@@ -25,9 +25,10 @@
  * @test
  * @bug 8168836
  * @summary Basic argument validation for --patch-module
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build PatchTestWarningError CompilerUtils JarUtils jdk.testlibrary.*
+ * @build PatchTestWarningError JarUtils jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng PatchTestWarningError
  */
 
@@ -38,6 +39,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.*;
 
 import org.testng.annotations.BeforeTest;
--- a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java	Wed Jul 05 23:36:51 2017 +0200
@@ -27,7 +27,7 @@
  * @summary Patch java.base and user module with ModuleHashes attribute
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
  * @run testng PatchSystemModules
  */
 
@@ -39,6 +39,7 @@
 import java.util.List;
 import java.util.stream.Stream;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.util.FileUtils;
 import jdk.testlibrary.JDKToolFinder;
 import org.testng.annotations.BeforeTest;
@@ -51,7 +52,6 @@
     private static final String JAVA_HOME = System.getProperty("java.home");
 
     private static final Path TEST_SRC = Paths.get(System.getProperty("test.src"));
-    private static final Path PATCH_SRC_DIR = TEST_SRC.resolve("src1");
 
     private static final Path JMODS = Paths.get(JAVA_HOME, "jmods");
     private static final Path MODS_DIR = Paths.get("mods");
@@ -66,6 +66,8 @@
     @BeforeTest
     private void setup() throws Throwable {
         Path src = TEST_SRC.resolve("src");
+        Path src1 = TEST_SRC.resolve("src1");
+
         for (String name : modules) {
             assertTrue(CompilerUtils.compile(src.resolve(name),
                                              MODS_DIR,
@@ -73,11 +75,11 @@
         }
 
         // compile patched source
-        String patchDir = PATCH_SRC_DIR.resolve(JAVA_BASE).toString();
-        assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve(JAVA_BASE),
+        String patchDir = src1.resolve(JAVA_BASE).toString();
+        assertTrue(CompilerUtils.compile(src1.resolve(JAVA_BASE),
                                          PATCH_DIR.resolve(JAVA_BASE),
                                          "--patch-module", "java.base=" + patchDir));
-        assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve("m2"),
+        assertTrue(CompilerUtils.compile(src1.resolve("m2"),
                                          PATCH_DIR.resolve("m2")));
 
         createJars();
@@ -88,10 +90,16 @@
             createImage();
         }
 
-        // create new copy of m1.jar
+        // compile a different version of m1
+        Path tmp = Paths.get("tmp");
+        assertTrue(CompilerUtils.compile(src1.resolve("m1"), tmp,
+                                         "--module-path", MODS_DIR.toString(),
+                                         "--module-source-path", src1.toString()));
+
+        // package new_m1.jar
         jar("--create",
             "--file=" + NEW_M1_JAR.toString(),
-            "-C", MODS_DIR.resolve("m1").toString(), ".");
+            "-C", tmp.resolve("m1").toString(), ".");
     }
 
     /*
@@ -150,13 +158,13 @@
         // Fail to upgrade m1.jar with mismatched hash
         runTestWithExitCode(getJava(IMAGE),
                 "--upgrade-module-path", NEW_M1_JAR.toString(),
-                "-m", "m1/p1.Main", "ShouldNeverRun");
+                "-m", "m1/p1.Main");
 
         // test when SystemModules fast path is not enabled, i.e. exploded image
         runTestWithExitCode(getJava(IMAGE),
                 "--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE),
                 "--upgrade-module-path", NEW_M1_JAR.toString(),
-                "-m", "m1/p1.Main", "ShouldNeverRun");
+                "-m", "m1/p1.Main");
     }
 
     /*
@@ -173,14 +181,14 @@
         runTestWithExitCode(getJava(IMAGE),
                 "--patch-module", "m1=.jar",
                 "--upgrade-module-path", NEW_M1_JAR.toString(),
-                "-m", "m1/p1.Main", "ShouldNeverRun");
+                "-m", "m1/p1.Main");
 
         // test when SystemModules fast path is not enabled, i.e. exploded image
         runTestWithExitCode(getJava(IMAGE),
                 "--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE),
                 "--patch-module", "m1=.jar",
                 "--upgrade-module-path", NEW_M1_JAR.toString(),
-                "-m", "m1/p1.Main", "ShouldNeverRun");
+                "-m", "m1/p1.Main");
     }
 
     private void runTestWithExitCode(String... options) throws Throwable {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/module-info.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module m1 {
+    requires m2;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/src1/m1/p1/Main.java	Wed Jul 05 23:36:51 2017 +0200
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p1;
+
+public class Main {
+    public static void main(String[] args) throws Exception {
+        throw new RuntimeException("should not reach here");
+    }
+}
--- a/jdk/test/tools/launcher/modules/upgrademodulepath/UpgradeModulePathTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/launcher/modules/upgrademodulepath/UpgradeModulePathTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -23,9 +23,10 @@
 
 /**
  * @test
- * @library /lib/testlibrary
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build UpgradeModulePathTest CompilerUtils jdk.testlibrary.*
+ * @build UpgradeModulePathTest jdk.testlibrary.*
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng UpgradeModulePathTest
  * @summary Basic test for java --upgrade-module-path
  */
@@ -34,6 +35,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+import jdk.test.lib.compiler.CompilerUtils;
 import static jdk.testlibrary.ProcessTools.executeTestJava;
 
 import org.testng.annotations.BeforeTest;
@@ -46,7 +48,6 @@
  * modue path.
  */
 
-
 @Test
 public class UpgradeModulePathTest {
 
--- a/jdk/test/tools/schemagen/MultiReleaseJarTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/schemagen/MultiReleaseJarTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -25,18 +25,18 @@
  * @test
  * @summary Test Multi-Release jar support in schemagen tool
  * @library /test/lib
- * @library /lib/testlibrary
  * @modules jdk.compiler java.xml.ws
  * @build jdk.test.lib.JDKToolFinder jdk.test.lib.JDKToolLauncher
  *        jdk.test.lib.process.OutputAnalyzer
  *        jdk.test.lib.process.ProcessTools
  *        jdk.test.lib.Utils
- *        CompilerUtils MultiReleaseJarTest
+ *        jdk.test.lib.compiler.CompilerUtils MultiReleaseJarTest
  * @run testng MultiReleaseJarTest
  */
 
 import jdk.test.lib.JDKToolLauncher;
 import jdk.test.lib.Utils;
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
 import org.testng.annotations.BeforeClass;
@@ -114,4 +114,5 @@
                     "--add-modules", "java.xml.ws"));
         }
     }
-}
\ No newline at end of file
+}
+
--- a/jdk/test/tools/wsgen/MultiReleaseJarTest.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/jdk/test/tools/wsgen/MultiReleaseJarTest.java	Wed Jul 05 23:36:51 2017 +0200
@@ -25,18 +25,18 @@
  * @test
  * @summary Test Multi-Release jar support in wsgen tool
  * @library /test/lib
- * @library /lib/testlibrary
  * @modules jdk.compiler java.xml.ws
  * @build jdk.test.lib.JDKToolFinder jdk.test.lib.JDKToolLauncher
  *        jdk.test.lib.process.OutputAnalyzer
  *        jdk.test.lib.process.ProcessTools
  *        jdk.test.lib.Utils
- *        CompilerUtils MultiReleaseJarTest
+ *        jdk.test.lib.compiler.CompilerUtils MultiReleaseJarTest
  * @run testng MultiReleaseJarTest
  */
 
 import jdk.test.lib.JDKToolLauncher;
 import jdk.test.lib.Utils;
+import jdk.test.lib.compiler.CompilerUtils;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.process.ProcessTools;
 import org.testng.annotations.BeforeClass;
@@ -117,4 +117,5 @@
                     "--add-modules", "java.xml.ws"));
         }
     }
-}
\ No newline at end of file
+}
+
--- a/make/Docs.gmk	Mon Jun 05 13:45:34 2017 -0700
+++ b/make/Docs.gmk	Wed Jul 05 23:36:51 2017 +0200
@@ -36,11 +36,23 @@
 $(eval $(call ReadImportMetaData))
 
 ################################################################################
-
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , Docs.gmk))
 
 ################################################################################
+# This file generates all documentation for OpenJDK.
+#
+# We will generate API documentation for two different selections of the source
+# code: "Java SE", which contains just the modules covered by the top-level
+# module java.se.ee, and "JDK", which covers all of Java SE and also all
+# other available modules that should be documented, including imported modules,
+# if any.
+#
+# We will also generate separate, free-standing specifications from either
+# markdown or existing html files.
+#
+
+################################################################################
 # Javadoc settings
 
 # On top of the sources that was used to compile the JDK, we need some
@@ -106,6 +118,8 @@
 FULL_COMPANY_NAME := Oracle and/or its affiliates
 COMPANY_ADDRESS := 500 Oracle Parkway<br>Redwood Shores, CA 94065 USA
 
+JAVA_PLATFORM := Java&trade; Platform
+
 ifeq ($(IS_DRAFT), true)
   DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong>
   ifeq ($(VERSION_BUILD), 0)
@@ -113,15 +127,12 @@
   else
     DRAFT_MARKER_TITLE := [build $(VERSION_BUILD)]
   endif
+  DRAFT_TEXT := Please note that the specifications and other information \
+      contained herein are not final and are subject to change. The \
+      information is being made available to you solely for purpose of \
+      evaluation.
 endif
 
-JAVADOC_WINDOW_TITLE := Java Platform SE $(VERSION_SPECIFICATION) \
-    $(DRAFT_MARKER_TITLE)
-
-JAVADOC_HEADER_TITLE := $(subst $(SPACE),&nbsp;,$(strip \
-    <strong>Java&trade; Platform<br>Standard Ed. \
-    $(VERSION_SPECIFICATION)</strong>$(DRAFT_MARKER_STR)))
-
 JAVADOC_BOTTOM := \
     <span style="font-size:smaller"> \
     <a href="$(BUG_SUBMIT_URL)">Submit a bug or feature</a><br> \
@@ -143,27 +154,24 @@
     <div style="background-color: $(HASH)EEEEEE"><div style="padding: 6px; \
     margin-top: 2px; margin-bottom: 6px; margin-left: 6px; margin-right: \
     6px; text-align: justify; font-size: 80%; font-family: Helvetica, Arial, \
-    sans-serif; font-weight: normal;">Please note that the specifications \
-    and other information contained herein are not final and are subject to \
-    change. The information is being made available to you solely for \
-    purpose of evaluation.</div></div>
+    sans-serif; font-weight: normal;">$(DRAFT_TEXT)</div></div>
 
 ################################################################################
 # JDK javadoc titles/text snippets
 
-JDK_JAVADOC_DOC_TITLE := Java&trade; Platform, Standard Edition Development Kit \
-    (JDK&trade;) $(VERSION_SPECIFICATION)<br>API Specification
+JDK_SHORT_NAME := JDK&trade; $(VERSION_SPECIFICATION)
+JDK_LONG_NAME := Standard Edition Development Kit (JDK&trade;) $(VERSION_SPECIFICATION)
 
 ################################################################################
 # Java SE javadoc titles/text snippets
 
-JAVASE_JAVADOC_DOC_TITLE := Java&trade; Platform, Standard Edition \
-    $(VERSION_SPECIFICATION)<br>API Specification
+JAVASE_SHORT_NAME := SE $(VERSION_SPECIFICATION)
+JAVASE_LONG_NAME := Standard Edition $(VERSION_SPECIFICATION)
 
 ################################################################################
+# Index page text titles/snippets
 
-JDK_INDEX_TITLE := Java&trade; Platform, Standard Edition Development Kit \
-    (JDK&trade;) $(VERSION_SPECIFICATION) Specification<br>$(DRAFT_MARKER_TITLE)
+JDK_INDEX_TITLE := $(JAVA_PLATFORM), $(JDK_LONG_NAME) Specification $(DRAFT_MARKER_TITLE)
 
 ################################################################################
 # Functions
@@ -187,9 +195,53 @@
   $1_MODULEGRAPH_TARGETS += $$($1_$2_PNG_TARGET)
 endef
 
+# Helper function to create the overview.html file to use with the -overview
+# javadoc option.
+# Returns the filename as $1_OVERVIEW.
+#
+# param 1: SetupJavadocGeneration namespace ($1)
+define create_overview_file
+  $1_OVERVIEW_TEXT := \
+      <!DOCTYPE html> \
+      <html><head></head><body> \
+      <p>This document is the API specification for $$($1_FULL_NAME).</p> \
+      #
+  ifneq ($$($1_GROUPS),)
+    $1_OVERVIEW_TEXT += \
+        <p>For an overview of the full specification, grouped by usage, see the <a href="../index.html">$$(JAVA_PLATFORM), $$($1_LONG_NAME) Specification</a>.</p> \
+        <dl> \
+        #
+    $1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \
+        <dt><a href="\#$$g">$$($$g_GROUP_NAME)</a></dt> \
+        <dd>$$($$g_GROUP_DESCRIPTION)</dt> \
+    )
+    $1_OVERVIEW_TEXT += \
+        </dl> \
+        #
+  endif
+  ifeq ($$(IS_DRAFT), true)
+    $1_OVERVIEW_TEXT += \
+        <p><strong>$$(DRAFT_TEXT)</strong></p> \
+        #
+  endif
+  $1_OVERVIEW_TEXT += \
+      </body></html> \
+      #
+
+  $1_OVERVIEW := $$(SUPPORT_OUTPUTDIR)/docs/$1-overview.html
+
+  $1_OVERVIEW_VARDEPS_FILE := $$(call DependOnVariable, $1_OVERVIEW_TEXT, \
+      $$($1_OVERVIEW).vardeps)
+
+  $$($1_OVERVIEW): $$($1_OVERVIEW_VARDEPS_FILE)
+	$$(call LogInfo, Creating overview.html for $1)
+	$$(call MakeDir, $$(@D))
+	$$(PRINTF) > $$@ '$$($1_OVERVIEW_TEXT)'
+endef
+
 ################################################################################
-# Setup make rules for creating the API documentation, using javadoc and other
-# tools if needed.
+# Setup make rules to create an API documentation collection, using javadoc and
+# other tools if needed.
 #
 # Parameter 1 is the name of the rule. This name is used as variable prefix.
 # Targets generated are returned as $1_JAVADOC_TARGETS and
@@ -198,14 +250,10 @@
 #
 # Remaining parameters are named arguments. These include:
 #   MODULES - Modules to generate javadoc for
-#   NAME - The name of the javadoc compilation, to be presented to the user
+#   GROUPS - Name of the groups to divide the modules into, if any
+#   SHORT_NAME - The short name of this documentation collection
+#   LONG_NAME - The long name of this documentation collection
 #   TARGET_DIR - Where to store the output
-#   OVERVIEW - Path to an html overview file
-#   DOC_TITLE - Title to use in -doctitle.
-#   WINDOW_TITLE - Title to use in -windowtitle.
-#   HEADER_TITLE - Title to use in -header.
-#   BOTTOM_TEXT - Text to use in -bottom.
-#   TOP_TEXT - Text to use in -top.
 #
 SetupApiDocsGeneration = $(NamedParamsMacroTemplate)
 define SetupApiDocsGenerationBody
@@ -224,7 +272,6 @@
   # Always include tags and basic options
   $1_OPTIONS := $$(JAVADOC_TAGS) $$(JAVADOC_OPTIONS)
 
-  $1_OPTIONS += -overview $$($1_OVERVIEW)
   $1_OPTIONS += --module-source-path $$(MODULES_SOURCE_PATH)
   $1_OPTIONS += --module $$(call CommaList, $$($1_MODULES))
 
@@ -232,12 +279,20 @@
   $1_OPTIONS += -Xdoclint:all,$$(call CommaList, $$(addprefix -, \
       $$(JAVADOC_DISABLED_DOCLINT)))
 
+  $1_FULL_NAME := $$(JAVA_PLATFORM), $$($1_LONG_NAME) \
+      $$(DRAFT_MARKER_TITLE)
+  $1_DOC_TITLE := $$($1_FULL_NAME)<br>API Specification
+  $1_WINDOW_TITLE := $$(subst &trade;,,$$(JAVA_PLATFORM) $$($1_SHORT_NAME)) \
+    $$(DRAFT_MARKER_TITLE)
+  $1_HEADER_TITLE := <strong>$$(JAVA_PLATFORM)<br>$$($1_SHORT_NAME)</strong> \
+      $$(DRAFT_MARKER_STR)
+
   $1_OPTIONS += -doctitle '$$($1_DOC_TITLE)'
   $1_OPTIONS += -windowtitle '$$($1_WINDOW_TITLE)'
   $1_OPTIONS += -header '$$($1_HEADER_TITLE)'
-  $1_OPTIONS += -bottom '$$($1_BOTTOM_TEXT)'
+  $1_OPTIONS += -bottom '$$(JAVADOC_BOTTOM)'
   ifeq ($$(IS_DRAFT), true)
-    $1_OPTIONS += -top '$$($1_TOP_TEXT)'
+    $1_OPTIONS += -top '$$(JAVADOC_TOP)'
   endif
 
   # Do not store debug level options in VARDEPS.
@@ -247,6 +302,15 @@
     $1_LOG_OPTION += -verbose
   endif
 
+  # Generate the overview.html file. This will return the filename in
+  # $1_OVERVIEW.
+  $$(eval $$(call create_overview_file,$1))
+  $1_OPTIONS += -overview $$($1_OVERVIEW)
+
+  $$(foreach g, $$($1_GROUPS), \
+    $$(eval $1_OPTIONS += -group "$$($$g_GROUP_NAME)" "$$($$g_GROUP_MODULES)") \
+  )
+
   $1_VARDEPS := $$($1_JAVA_ARGS) $$($1_OPTIONS) $$(MODULES_SOURCE_PATH) \
       $$($1_ALL_MODULES)
   $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
@@ -259,7 +323,7 @@
   # Javadoc creates a lot of files but use index.html as a marker
   $$($1_TARGET_DIR)/index.html: $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) \
       $$($1_SOURCE_DEPS) $$($1_OVERVIEW)
-	$$(call LogWarn, Generating $$($1_NAME) API javadoc for \
+	$$(call LogWarn, Generating $1 javadoc for \
 	    $$(words $$($1_ALL_MODULES)) modules)
 	$$(call LogInfo, Javadoc modules: $$($1_ALL_MODULES))
 	$$(call MakeDir, $$($1_TARGET_DIR))
@@ -291,7 +355,7 @@
     $1_GENGRAPHS_MARKER := $$($1_GENGRAPHS_DIR)/_gengraphs_run.marker
 
     $$($1_GENGRAPHS_MARKER): $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS)
-	$$(call LogInfo, Running gengraphs for $$($1_NAME) API documentation)
+	$$(call LogInfo, Running gengraphs for $1 documentation)
 	$$(call MakeDir, $$($1_GENGRAPHS_DIR))
 	$$(call ExecuteWithLog, $$($1_GENGRAPHS_DIR)/gengraphs, \
 	    $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \
@@ -310,21 +374,49 @@
 ################################################################################
 # Setup generation of the JDK API documentation (javadoc + modulegraph)
 
+# Define the groups of the JDK API documentation
+JavaSE_GROUP_NAME := Java SE
+JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se.ee \
+    $(call FindTransitiveIndirectDepsForModules, java.se.ee)))
+JavaSE_GROUP_DESCRIPTION := \
+    The Java Platform, Standard Edition ("Java SE") APIs define the core Java \
+    platform for general-purpose computing. These APIs are in modules with \
+    names starting with the string "java.". \
+    #
+JDK_GROUPS += JavaSE
+
+JDK_GROUP_NAME := JDK
+JDK_GROUP_MODULES := jdk.*
+JDK_GROUP_DESCRIPTION := \
+    The Java Development Kit ("JDK") APIs define an implementation of the Java \
+    SE Platform which may include platform-specific details. These APIs are in \
+    modules with names starting with the string "jdk.". \
+    #
+JDK_GROUPS += JDK
+
+# If we are importing JavaFX, we need a JavaFX group. In an ideal world, this
+# would have been abstracted away to a more proper generic handling of imported
+# modules.
+ifneq ($(findstring javafx., $(IMPORTED_MODULES)), )
+  JavaFX_GROUP_NAME := JavaFX
+  JavaFX_GROUP_MODULES := javafx.*
+  JavaFX_GROUP_DESCRIPTION := \
+      The JavaFX APIs define a set of user interface (UI) controls, graphics, \
+      media, and web packages for developing rich client applications. These \
+      APIs are in modules with names starting with the string "javafx.". \
+      #
+  JDK_GROUPS += JavaFX
+endif
+
 # All modules to have docs generated by docs-jdk-api target
-JDK_JAVADOC_MODULES := $(sort $(DOCS_MODULES))
-
-JDK_JAVADOC_OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html
+JDK_MODULES := $(sort $(DOCS_MODULES))
 
 $(eval $(call SetupApiDocsGeneration, JDK_API, \
-    MODULES := $(JDK_JAVADOC_MODULES), \
-    NAME := JDK, \
+    MODULES := $(JDK_MODULES), \
+    GROUPS := $(JDK_GROUPS), \
+    SHORT_NAME := $(JDK_SHORT_NAME), \
+    LONG_NAME := $(JDK_LONG_NAME), \
     TARGET_DIR := $(DOCS_OUTPUTDIR)/api, \
-    OVERVIEW := $(JDK_JAVADOC_OVERVIEW), \
-    DOC_TITLE := $(JDK_JAVADOC_DOC_TITLE), \
-    WINDOW_TITLE := $(JAVADOC_WINDOW_TITLE), \
-    HEADER_TITLE := $(JAVADOC_HEADER_TITLE), \
-    BOTTOM_TEXT := $(JAVADOC_BOTTOM), \
-    TOP_TEXT := $(JAVADOC_TOP), \
 ))
 
 # Targets generated are returned in JDK_API_JAVADOC_TARGETS and
@@ -335,20 +427,13 @@
 
 # The Java SE module scope is just java.se.ee and it's transitive indirect
 # exports.
-JAVASE_JAVADOC_MODULES := java.se.ee
-
-JAVASE_JAVADOC_OVERVIEW := $(JDK_TOPDIR)/src/java.base/share/classes/overview-core.html
+JAVASE_MODULES := java.se.ee
 
 $(eval $(call SetupApiDocsGeneration, JAVASE_API, \
-    MODULES := $(JAVASE_JAVADOC_MODULES), \
-    NAME := Java SE, \
+    MODULES := $(JAVASE_MODULES), \
+    SHORT_NAME := $(JAVASE_SHORT_NAME), \
+    LONG_NAME := $(JAVASE_LONG_NAME), \
     TARGET_DIR := $(IMAGES_OUTPUTDIR)/javase-docs/api, \
-    OVERVIEW := $(JAVASE_JAVADOC_OVERVIEW), \
-    DOC_TITLE := $(JAVASE_JAVADOC_DOC_TITLE), \
-    WINDOW_TITLE := $(JAVADOC_WINDOW_TITLE), \
-    HEADER_TITLE := $(JAVADOC_HEADER_TITLE), \
-    BOTTOM_TEXT := $(JAVADOC_BOTTOM), \
-    TOP_TEXT := $(JAVADOC_TOP), \
 ))
 
 # Targets generated are returned in JAVASE_API_JAVADOC_TARGETS and
--- a/make/common/MakeBase.gmk	Mon Jun 05 13:45:34 2017 -0700
+++ b/make/common/MakeBase.gmk	Wed Jul 05 23:36:51 2017 +0200
@@ -978,6 +978,17 @@
   )
 
 ################################################################################
+# Converts a space separated list to a colon separated list.
+#
+# Replacing double-colon with a single colon is to workaround the issue with
+# some version of make on windows that doesn't substitute spaces with one colon
+# properly.
+ColonList = \
+  $(strip \
+      $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
+  )
+
+################################################################################
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , common/MakeBase.gmk))
--- a/nashorn/.hgtags	Mon Jun 05 13:45:34 2017 -0700
+++ b/nashorn/.hgtags	Wed Jul 05 23:36:51 2017 +0200
@@ -415,3 +415,5 @@
 edb825e2dfb140c8e57a61b5d45de19edebccccf jdk-10+8
 d7d69c89088aec56d13bbff81a6f0a8b68ca75f4 jdk-10+9
 fc416270a776409b74006262dd0a9f5f5ff31555 jdk-9+171
+f381e171bec90afee95dc2920793754b58b6f705 jdk-10+10
+c8d6b740f0f7ec834b4157bf0d4523e8bbddb3f0 jdk-9+172
--- a/test/lib/jdk/test/lib/compiler/CompilerUtils.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/test/lib/jdk/test/lib/compiler/CompilerUtils.java	Wed Jul 05 23:36:51 2017 +0200
@@ -39,7 +39,6 @@
  * This class consists exclusively of static utility methods for invoking the
  * java compiler.
  */
-
 public final class CompilerUtils {
     private CompilerUtils() { }
 
@@ -52,13 +51,21 @@
      *
      * @return true if the compilation is successful
      *
-     * @throws IOException if there is an I/O error scanning the source tree or
-     *                     creating the destination directory
+     * @throws IOException
+     *         if there is an I/O error scanning the source tree or
+     *         creating the destination directory
+     * @throws UnsupportedOperationException
+     *         if there is no system java compiler
      */
-    public static boolean compile(Path source, Path destination, String ... options)
+    public static boolean compile(Path source, Path destination, String... options)
         throws IOException
     {
         JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        if (compiler == null) {
+            // no compiler available
+            throw new UnsupportedOperationException("Unable to get system java compiler. "
+                    + "Perhaps, jdk.compiler module is not available.");
+        }
         StandardJavaFileManager jfm = compiler.getStandardFileManager(null, null, null);
 
         List<Path> sources
--- a/test/lib/jdk/test/lib/hprof/parser/HprofReader.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/test/lib/jdk/test/lib/hprof/parser/HprofReader.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
 import java.io.*;
 import java.util.Date;
 import java.util.Hashtable;
+import java.util.Map;
 import jdk.test.lib.hprof.model.ArrayTypeCodes;
 import jdk.test.lib.hprof.model.*;
 
@@ -357,6 +358,22 @@
         return snapshot;
     }
 
+    public String printStackTraces() {
+        StringBuffer output = new StringBuffer();
+        for (Map.Entry<Integer, StackTrace> entry : stackTraces.entrySet()) {
+            StackFrame[] frames = entry.getValue().getFrames();
+            output.append("SerialNo " + entry.getKey() + "\n");
+            for (int i = 0; i < frames.length; i++) {
+                output.append("  " + frames[i].getClassName() + "." + frames[i].getMethodName()
+                        + frames[i].getMethodSignature() + " (" + frames[i].getSourceFileName()
+                        + ":" + frames[i].getLineNumber() + ")" + "\n");
+            }
+        }
+
+        System.out.println(output);
+        return output.toString();
+    }
+
     private void skipBytes(long length) throws IOException {
         while (length > 0) {
             long skipped = in.skip(length);
--- a/test/lib/jdk/test/lib/hprof/parser/Reader.java	Mon Jun 05 13:45:34 2017 -0700
+++ b/test/lib/jdk/test/lib/hprof/parser/Reader.java	Wed Jul 05 23:36:51 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,4 +94,42 @@
             }
         }
     }
+
+    /**
+     * Get Stack Traces from a Hprof file.
+     *
+     * @param heapFile The name of a file containing a heap dump
+     */
+    public static String getStack(String heapFile, int debugLevel)
+            throws IOException {
+        int dumpNumber = 1;
+        int pos = heapFile.lastIndexOf('#');
+        if (pos > -1) {
+            String num = heapFile.substring(pos+1, heapFile.length());
+            try {
+                dumpNumber = Integer.parseInt(num, 10);
+            } catch (java.lang.NumberFormatException ex) {
+                String msg = "In file name \"" + heapFile
+                             + "\", a dump number was "
+                             + "expected after the :, but \""
+                             + num + "\" was found instead.";
+                System.err.println(msg);
+                throw new IOException(msg);
+            }
+            heapFile = heapFile.substring(0, pos);
+        }
+        try (PositionDataInputStream in = new PositionDataInputStream(
+                new BufferedInputStream(new FileInputStream(heapFile)))) {
+            int i = in.readInt();
+            if (i == HprofReader.MAGIC_NUMBER) {
+                HprofReader r
+                    = new HprofReader(heapFile, in, dumpNumber,
+                                      true, debugLevel);
+                r.read();
+                return r.printStackTraces();
+            } else {
+                throw new IOException("Unrecognized magic number: " + i);
+            }
+        }
+    }
 }