diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp index 554d6a75433f16f615eac390c6bd5965cc7e3004..a74e62d6b95f29fbd414eabf5293cda6f5b9df16 100644 --- a/src/share/vm/runtime/arguments.cpp +++ b/src/share/vm/runtime/arguments.cpp @@ -3262,7 +3262,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) { "Shared spaces are not supported in this VM\n"); return JNI_ERR; } - if (UseSharedSpaces || PrintSharedSpaces) { + if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) || PrintSharedSpaces) { warning("Shared spaces are not supported in this VM"); FLAG_SET_DEFAULT(UseSharedSpaces, false); FLAG_SET_DEFAULT(PrintSharedSpaces, false);