|
1 | 1 | /////////////////////////////////////////////////////////////////////////////// |
2 | 2 |
|
3 | | - Copyright (c) 2021, 2025 Oracle and/or its affiliates. |
| 3 | + Copyright (c) 2021, 2026 Oracle and/or its affiliates. |
4 | 4 |
|
5 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
6 | 6 | you may not use this file except in compliance with the License. |
@@ -138,24 +138,38 @@ using the provide |
138 | 138 | ./target/helidon-quickstart-{flavor-lc}-jri/bin/start |
139 | 139 | ---- |
140 | 140 |
|
141 | | -=== Class Data Sharing (CDS) Archive |
| 141 | +=== Class Data Sharing (CDS) Archive and AOT Cache |
142 | 142 |
|
143 | | -Also included in the custom image is a Class Data Sharing (CDS) archive that |
| 143 | +If you are building with Java 24 or earlier a Class Data Sharing (CDS) archive |
| 144 | +is also included in your custom image by default. The CDS archive |
144 | 145 | improves your application's startup performance and in-memory footprint. |
145 | 146 | You can learn more about Class Data Sharing in the link:{jdk-doc-url}/vm/class-data-sharing.html[JDK documentation]. |
146 | 147 |
|
147 | | -The CDS archive increases your image size to get these performance optimizations. |
148 | | -It can be of significant size (tens of MB). The size of the CDS archive is |
| 148 | +If you are building with Java 25 or later an AOT Cache is created instead of a |
| 149 | +CDS archive. The AOT Cache is more advanced than the CDS archive and over time |
| 150 | +will contain more optimizations for improving application startup performance. |
| 151 | +You can learn more about the AOT Cache in the following JEPS: link:https://openjdk.org/jeps/483[JEP 483], |
| 152 | +link:https://openjdk.org/jeps/515[JEP 515], link:https://openjdk.org/jeps/514[JEP 514] |
| 153 | +
|
| 154 | +An on-disk cache (CDS Archive or AOT Cache) increases the size of the custom image to get these performance optimizations. |
| 155 | +It can be of significant size (tens of MB). The size of the on-disk cache is |
149 | 156 | reported at the end of the build output. |
150 | 157 |
|
151 | | -If you'd rather have a smaller image size (with a slightly increased startup time) you |
152 | | -can skip the creation of the CDS archive by executing your build like this: |
| 158 | +If you want to skip the creation of the on-disk cache you can do so by |
| 159 | +executing your build like this: |
153 | 160 |
|
| 161 | +==== For Java 24 or earlier |
154 | 162 | [source,bash] |
155 | 163 | ---- |
156 | 164 | mvn package -Pjlink-image -Djlink.image.addClassDataSharingArchive=false |
157 | 165 | ---- |
158 | 166 |
|
| 167 | +==== For Java 25 or later |
| 168 | +[source,bash] |
| 169 | +---- |
| 170 | +mvn package -Pjlink-image -Djlink.image.addAotCache=false |
| 171 | +---- |
| 172 | +
|
159 | 173 | For more information on available configuration options see the |
160 | 174 | link:{helidon-maven-plugin-doc-url}#goal-jlink-image[`helidon-maven-plugin` documentation]. |
161 | 175 |
|
|
0 commit comments