~ rm -f /Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/lib/server/classes.jsa ~ java -Xshare:on HelloCDS An error has occurred while processing the shared archive file. Specified shared archive not found. Error occurred during initialization of VM Unable to use shared archive.
~ java -Xshare:dump narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3 Allocated temporary class space: 1073741824 bytes at 0x00000008c0000000 Allocated shared space: 3221225472 bytes at 0x0000000800000000 Loading classes to share ... Loading classes to share: done. Rewriting and linking classes ... Rewriting and linking classes: done Number of classes 1222 instance classes = 1162 obj array classes = 52 type array classes = 8 Updating ConstMethods ... done. Removing unshareable information ... done. Scanning all metaspace objects ... Allocating RW objects ... Allocating RO objects ... Relocating embedded pointers ... Relocating external roots ... Dumping symbol table ... Dumping objects to closed archive heap region ... Dumping objects to open archive heap region ... Relocating SystemDictionary::_well_known_klasses[] ... Removing java_mirror ... done. mc space: 8104 [ 0.0% of total] out of 8192 bytes [ 98.9% used] at 0x0000000800000000 rw space: 3930240 [ 21.6% of total] out of 3932160 bytes [100.0% used] at 0x0000000800002000 ro space: 7198872 [ 39.6% of total] out of 7200768 bytes [100.0% used] at 0x00000008003c2000 md space: 2560 [ 0.0% of total] out of 4096 bytes [ 62.5% used] at 0x0000000800aa0000 od space: 6388936 [ 35.2% of total] out of 6389760 bytes [100.0% used] at 0x0000000800aa1000 st0 space: 425984 [ 2.3% of total] out of 425984 bytes [100.0% used] at 0x00000007bff00000 oa0 space: 212992 [ 1.2% of total] out of 212992 bytes [100.0% used] at 0x00000007bfe00000 total : 18167688 [100.0% of total] out of 18173952 bytes [100.0% used] ~ java -Xshare:on HelloCDS Hello CDS