A team has a multi-release JAR that supports both Java 11 and Java 17. They want to ensure that when running on Java 17, the version-specific classes in META-INF/versions/17 are used. Which condition must be true?
The manifest entry is required to activate multi-release behavior.
Why this answer
Option D is correct because the Java runtime checks for the `Multi-Release: true` entry in the JAR's manifest file to enable multi-release JAR functionality. Without this manifest attribute, the JVM ignores versioned directories under `META-INF/versions/` and uses only the root classes, even if the JAR was compiled with `--multi-release 17`.
Exam trap
Oracle often tests the misconception that the `--multi-release` compiler or jar tool option alone enables version selection at runtime, when in fact the manifest entry `Multi-Release: true` is the sole runtime trigger.
How to eliminate wrong answers
Option A is wrong because a `module-info.class` in the root is required for modular JARs but is not a condition for multi-release JAR behavior; the runtime resolves version-specific classes based on the manifest, not module descriptors. Option B is wrong because multi-release JARs work correctly on both the class path and module path; placing the JAR on the module path is not a prerequisite for version-specific class loading. Option C is wrong because the `--multi-release 17` flag is used at JAR creation time to embed versioned classes, but the runtime behavior depends solely on the manifest entry `Multi-Release: true`; without it, the JVM will not activate version selection.