# HG changeset patch
# User jiangli
# Date 1418878587 0
# Node ID aa22c7773cc46bd2fa0c829b4e2a5e5ca56c38f5
# Parent  047115468f165a60549cfd8635661fb7cec73f98# Parent  e1fed6244e903d3ea702f4ba2f848be71d7d489e
Merge

diff -r 047115468f16 -r aa22c7773cc4 hotspot/src/share/vm/runtime/arguments.cpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Dec 17 23:34:52 2014 -0500
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Dec 18 04:56:27 2014 +0000
@@ -2997,17 +2997,20 @@
 #endif
     // -D
     } else if (match_option(option, "-D", &tail)) {
-      if (match_option(option, "-Djava.endorsed.dirs=", &tail)) {
+      const char* value;
+      if (match_option(option, "-Djava.endorsed.dirs=", &value) &&
+            *value!= '\0' && strcmp(value, "\"\"") != 0) {
         // abort if -Djava.endorsed.dirs is set
         jio_fprintf(defaultStream::output_stream(),
-          "-Djava.endorsed.dirs is not supported. Endorsed standards and standalone APIs\n"
-          "in modular form will be supported via the concept of upgradeable modules.\n");
+          "-Djava.endorsed.dirs=%s is not supported. Endorsed standards and standalone APIs\n"
+          "in modular form will be supported via the concept of upgradeable modules.\n", value);
         return JNI_EINVAL;
       }
-      if (match_option(option, "-Djava.ext.dirs=", &tail)) {
+      if (match_option(option, "-Djava.ext.dirs=", &value) &&
+            *value != '\0' && strcmp(value, "\"\"") != 0) {
         // abort if -Djava.ext.dirs is set
         jio_fprintf(defaultStream::output_stream(),
-          "-Djava.ext.dirs is not supported.  Use -classpath instead.\n");
+          "-Djava.ext.dirs=%s is not supported.  Use -classpath instead.\n", value);
         return JNI_EINVAL;
       }