JDK-8226529 : Release Note: JEP 350 Dynamic CDS Archiving
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2019-06-20
  • Updated: 2019-09-10
  • Resolved: 2019-07-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13Resolved
Description
JEP 350 extends application class-data sharing ([AppCDS](https://openjdk.java.net/jeps/310)) to allow the dynamic archiving
of classes as a Java application is exiting. It also improves the usability of AppCDS by
eliminating the need for users to do trial runs to create a class list for each application. The existing
static archiving enabled by the `-Xshare:dump` option, using a class list, continues work as is.

The dynamically-generated archive is created on top of the default system archive packaged with the
running JDK image. A separate top-layer archive file is generated for each application. The user can 
specify the filename of the dynamic archive name as the argument to the `-XX:ArchiveClassesAtExit`
option. For example, the following command creates `hello.jsa`:
```
    % bin/java -XX:ArchiveClassesAtExit=hello.jsa -cp hello.jar Hello
```
To run the same application using this dynamic archive:
```
    % bin/java -XX:SharedArchiveFile=hello.jsa -cp hello.jar Hello
```

The user could also specify both the base and the dynamic archives in the `-XX:SharedArchiveFile` option such as:
```
    -XX:SharedArchiveFile=<base archive>:<dynamic archive>
```

[CSR JDK-8221706](https://bugs.openjdk.java.net/browse/JDK-8221706) has more details on the command line option.