8003539: Minimal VM don't react to -Dcom.sun.management and -XX:+ManagementServer
authorjprovino
Tue, 05 Feb 2013 13:32:34 -0500
changeset 15757 c8bc1070b876
parent 15483 113ca9e9c1bb
child 15758 619e0eebeb86
8003539: Minimal VM don't react to -Dcom.sun.management and -XX:+ManagementServer Summary: A warning message should be displayed if these options are used with the Minimal VM. Reviewed-by: dholmes, dsamersoff
hotspot/src/share/vm/runtime/arguments.cpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Sun Jan 27 01:07:09 2013 -0800
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Feb 05 13:32:34 2013 -0500
@@ -2458,7 +2458,12 @@
       }
       // Out of the box management support
       if (match_option(option, "-Dcom.sun.management", &tail)) {
+#if INCLUDE_MANAGEMENT
         FLAG_SET_CMDLINE(bool, ManagementServer, true);
+#else
+        vm_exit_during_initialization(
+            "-Dcom.sun.management is not supported in this VM.", NULL);
+#endif
       }
     // -Xint
     } else if (match_option(option, "-Xint", &tail)) {
@@ -2807,6 +2812,11 @@
       //       away and will cause VM initialization failures!
       warning("-XX:+UseVMInterruptibleIO is obsolete and will be removed in a future release.");
       FLAG_SET_CMDLINE(bool, UseVMInterruptibleIO, true);
+#if !INCLUDE_MANAGEMENT
+    } else if (match_option(option, "-XX:+ManagementServer", &tail)) {
+      vm_exit_during_initialization(
+        "ManagementServer is not supported in this VM.", NULL);
+#endif // INCLUDE_MANAGEMENT
     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
       // Skip -XX:Flags= since that case has already been handled
       if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {