java -Xshare:dump -XX:SharedClassListFile=myapp.classlist \ -XX:SharedArchiveFile=myapp_static.jsa -jar myapp.jar
Runs the application in myapp.jar with the class list in myapp.classlist to produce a shared class data archive at myapp_static.jsa.
The -XX:SharedClassListFile option is used to process a class list generated by -XX:DumpLoadedClassList and, together with the -Xshare:dump and -XX:SharedArchiveFile arguments, generates a shared class data archive for the application classes. This can substantially improve the startup time of the application. See the description of the -Xshare option for details on Class Data Sharing.
-XX:SharedClassListFile has no default, and must be specified when generating a shared class data archive from a class list.
If the file specified with -XX:SharedClassListFile does not exist or otherwise cannot be read, then the JVM exits with an error message:
Allocated shared space: 3221225472 bytes at 0x0000000800000000
Loading classes to share ...
Error occurred during initialization of VM
Loading classlist failed: No such file or directory
Arguments Related to -XX:SharedClassListFile:
TODO: link to -Xshare TODO: link to -XX:DumpLoadedClassList TODO: link to -XX:SharedArchiveFile TODO: link to -XX:ArchiveClassesAtExit
• Java Application Class Data Sharing.
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your
insights will help the entire 10+ million java developer community to develop
one standard source of documentation for all the JVM arguments.
Edit your Comment