[GR-71974] Compatibility Mode for Native Image.#12756
Open
graalvmbot wants to merge 1 commit intomasterfrom
Open
[GR-71974] Compatibility Mode for Native Image.#12756graalvmbot wants to merge 1 commit intomasterfrom
graalvmbot wants to merge 1 commit intomasterfrom
Conversation
a2bc06b to
4383cfd
Compare
ba3523c to
2b0171b
Compare
This was referenced Jan 13, 2026
3ebb2f0 to
e0b2332
Compare
e57aeed to
5bb59bb
Compare
6a60f88 to
bcfcda5
Compare
bcfcda5 to
b2bef6c
Compare
d181fb3 to
ee18168
Compare
The goal of this mode is to remove native-image implementation-specific behavior: no build-time initialization on classpath, no custom system properties for native image, no substitutions on classpath, no user features, future defaults enabled by default. It still does not modify the key restrictions of Native Image which are related to dynamic access and run-time class loading. Also, this mode still does not disable flags such as --features and --initialize-at-build-time from the command line. This will be discussed separately and done in a separate PR. To get the same behavior as the underlying language it is recommended to use this flag with: native-image -H:+CompatibilityMode -H:Preserve=all -H:+RuntimeClassLoading App And to run it with: ./app -Djava.home=<path-to-java-home> -Djava.class.path=<cp> -Djdk.module.path=<module-path>
ee18168 to
357d598
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal of this mode is to remove native-image implementation-specific behavior: no build-time initialization on classpath, no custom system properties for native image, no substitutions on classpath, no user features, future defaults enabled by default.
It still does not modify the key restrictions of Native Image which are related to dynamic access and run-time class loading.
To get the same behavior as the underlying language it is recommended to use this flag with:
And to run it with:
The Native Build Tools PR that accompanies this one:
graalvm/native-build-tools#822