You can improve the startup time of a application server/java application (for example the runtime) by using Class Data Sharing

Step-by-step guide

Adding these parameters will make sure the CDS (class data sharing) archive file (a file with the extension .jsa will be created)

  1. Add the following JVM parameters
    1. -XX:+AutoCreateSharedArchive

    2. -XX:SharedArchiveFile=/path/to/store/cds/archive/app.jsa
  2. Start the application (server) the first time (it will not startup faster this time because the .jsa file does not exist yet)
  3. On new startups the application server/jkava application will startup way faster
  4. Don't forget to remove the .jsa file when the war/jar changes to make sure the .jsa is up-to-date


More information can be found on: https://docs.oracle.com/en/java/javase/21/vm/class-data-sharing.html