Skip to content

Commit c0e8234

Browse files
authored
Update docs to mention support for AOT Cache in custom jlink images (helidon-io#11226)
* Update docs to mention support for AOT Cache in custom jlink images
1 parent d9d000e commit c0e8234

2 files changed

Lines changed: 23 additions & 9 deletions

File tree

docs/src/main/asciidoc/includes/attributes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ifeval::["{helidon-version-is-release}" == "true"]
3939
endif::[]
4040
4141
// versions
42-
:version-plugin-helidon: 3.0.5
42+
:version-plugin-helidon: 4.0.24
4343
4444
:version-lib-microprofile-api: 6.1
4545
@@ -94,7 +94,7 @@ endif::[]
9494
:jdk-doc-url: https://docs.oracle.com/en/java/javase/21
9595
:jdk-javadoc-url: {jdk-doc-url}/docs/api
9696
97-
:helidon-maven-plugin-doc-url: https://github.com/oracle/helidon-build-tools/blob/{version-plugin-helidon}/maven-plugins/helidon-maven-plugin/README.md
97+
:helidon-maven-plugin-doc-url: https://github.com/helidon-io/helidon-build-tools/blob/{version-plugin-helidon}/maven-plugins/helidon-maven-plugin/README.md
9898
9999
// MicroProfile versioned URLs
100100

docs/src/main/asciidoc/includes/guides/jlink-image.adoc

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2021, 2025 Oracle and/or its affiliates.
3+
Copyright (c) 2021, 2026 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -138,24 +138,38 @@ using the provide
138138
./target/helidon-quickstart-{flavor-lc}-jri/bin/start
139139
----
140140
141-
=== Class Data Sharing (CDS) Archive
141+
=== Class Data Sharing (CDS) Archive and AOT Cache
142142
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
144145
improves your application's startup performance and in-memory footprint.
145146
You can learn more about Class Data Sharing in the link:{jdk-doc-url}/vm/class-data-sharing.html[JDK documentation].
146147
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
149156
reported at the end of the build output.
150157
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:
153160
161+
==== For Java 24 or earlier
154162
[source,bash]
155163
----
156164
mvn package -Pjlink-image -Djlink.image.addClassDataSharingArchive=false
157165
----
158166
167+
==== For Java 25 or later
168+
[source,bash]
169+
----
170+
mvn package -Pjlink-image -Djlink.image.addAotCache=false
171+
----
172+
159173
For more information on available configuration options see the
160174
link:{helidon-maven-plugin-doc-url}#goal-jlink-image[`helidon-maven-plugin` documentation].
161175

0 commit comments

Comments
 (0)