Profile Image
vishnupriya

What is Java Class Sharing Archive File: -XX:SharedArchiveFile?

What is Java Class Sharing Archive File: -XX:SharedArchiveFile? 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-sharedarchivefile

  • x-sharedarchivefile

  • Java Class Sharing Archive File

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

• -XX:SharedArchiveFile=<filename>

 

Description:

 

The -XX:SharedArchiveFile option specifies the path of the shared archive used with Class Data Sharing.

 

When this option is used together with -Xshare:dump and -XX:SharedClassListFile then the JVM generates a new shared class data archive file at the path specified with -XX:SharedArchiveFile, using the list of classes specified by -XX:SharedClassListFile.

 

When this option is used with -Xshare:auto or -Xshare:on, then the specified path is used to load the shared class data archive file to increase the startup speed of the Java application.

 

See the description of the -Xshare option for details on Class Data Sharing

 

Default Value:


The default value of -XX:SharedArchiveFile on Linux/MacOS/Solaris is:


$JAVA_HOME/lib/server/classes.jsa


On Windows the default location is:


%JAVA_HOME%\bin\server\classes.jsa


Errors:


None

 

Arguments Related to -Xshare:


TODO: link to -Xshare TODO: link to -XX:DumpLoadedClassList TODO: link
to -XX:SharedClassListFile TODO: link to -XX:ArchiveClassesAtExit


Related Posts:


• Java Application Class Data Sharing.

 

NOTE:


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-sharedarchivefile

  • x-sharedarchivefile

  • Java Class Sharing Archive File