--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp Thu Dec 04 16:16:01 2014 +0000
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp Thu Dec 04 15:20:09 2014 -0800
@@ -969,7 +969,7 @@
#endif
// If -Xshare:on is specified, print out the error message and exit VM,
// otherwise, set UseSharedSpaces to false and continue.
- if (RequireSharedSpaces) {
+ if (RequireSharedSpaces || PrintSharedArchiveAndExit) {
vm_exit_during_initialization("Unable to use shared archive.", "Failed map_region for using -Xshare:on.");
} else {
FLAG_SET_DEFAULT(UseSharedSpaces, false);