Java / GraalVM Interview questions
What is a fallback image?
A fallback image is what native-image produces when it can't fully complete static analysis or AOT compilation of the application - for example, if it detects unsupported reflective or dynamic behavior it can't resolve at build time.
Instead of failing the build outright, it emits a small wrapper executable that, when run, actually launches a regular JVM behind the scenes to execute the application as bytecode - so you still get a runnable artifact, just without any of Native Image's startup or footprint benefits.
Seeing a fallback image is a signal, not a solution: it usually means some part of the app or a dependency needs proper GraalVM reflection/resource configuration, and by default recent native-image versions will refuse to silently produce a fallback unless you pass --no-fallback is explicitly avoided or a fallback is explicitly allowed.
More Related questions...