Profile Image

What is Java Archive Classes at Exit: -XX:ArchiveClassesAtExit?

What is Java Archive Classes at Exit: -XX:ArchiveClassesAtExit? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-archiveclassesatexit

  • x-archiveclassesatexit

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



• -XX:ArchiveClassesAtExit=<filename>



 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.


Default Value:

-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
to -XX:SharedClassListFile

Related Posts:

• 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.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-archiveclassesatexit

  • x-archiveclassesatexit