The -XX:ArchiveClassesAtExit is used to create a dynamic shared class data file for Class Data Sharing.
Using -XX:ArchiveClassesAtExit can be more convenient than preparing a list of classes with -XX:DumpLoadedClassList and then using that list to generate a shared archive with -Xshare:dump. By specifying -XX:ArchiveClassesAtExit on first running an application, a shared class data archive will be generated when the application exits. The class list for this archive is generated dynamically during the application runtime, based on the classes actually used during execution.
Subsequently, the generated archive can be loaded by specifying -XX:SharedArchiveFile pointing at the same file that was used as the argument to -XX:ArchiveClassesAtExit. This can substantially improve the startup time of an application.
See the description of the -Xshare option for details on Class Data Sharing.
-XX:ArchiveClassesAtExit has no default value, i.e. a shared class data archive
is not generated by default
Arguments Related to -XX:ArchiveClassesAtExit:
TODO: link to -Xshare TODO: link to -XX:DumpLoadedClassList TODO: link
• 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.