Profile Image
vishnupriya

What is Java Shared Class List File: -XX:SharedClassListFile?

What is Java Shared Class List File: -XX:SharedClassListFile? 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-sharedclasslistfile

  • x-sharedclasslistfile

  • Java Shared Class List File

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

• -XX:SharedClassListFile=<filename>

 

Example:

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.

 

Description:

 

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.

 

Default Value:

 

-XX:SharedClassListFile has no default, and must be specified when generating a shared class data archive from a class list.

 

Errors:

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

 

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

  • x-sharedclasslistfile

  • Java Shared Class List File