Courseiva
Java Platform Overview and PackaginghardMultiple ChoiceObjective-mapped

1Z0-829 Java Platform Overview and Packaging Practice Question

A company uses a multi-release JAR (MR-JAR) that contains classes for Java 9 and Java 11 in `META-INF/versions/9/` and `META-INF/versions/11/` respectively. The application runs on Java 17. Which version of a class that exists in both versioned directories is loaded?

⚠ Common exam trap

Test-takers frequently assume the runtime will load the version matching the exact running Java version (Java 17) or fall back to the root, but the MR-JAR specification actually selects the highest versioned directory that does not exceed the current version, not the exact match or the root.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The version from META-INF/versions/11/

In a multi-release JAR (MR-JAR), the Java runtime selects the versioned directory that matches the major version of the running Java platform, or the highest versioned directory that does not exceed that version. Since the application runs on Java 17, and the highest available versioned directory is for Java 11 (META-INF/versions/11/), the class from that directory is loaded. The root directory is used only when no appropriate versioned directory exists.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The version from META-INF/versions/9/

    Why it's wrong here

    Version 9 is lower than 11; Java 17 will prefer a higher version if available.

  • The version from the root of the JAR

    Why it's wrong here

    Root is used only if no versioned directory matches the runtime version.

  • The version from META-INF/versions/11/

    Why this is correct

    Java 17 selects the highest version ≤ 17, which is 11 if present.

  • The version from META-INF/versions/17/

    Why it's wrong here

    There is no version 17 directory; it would need to exist.

About these practice questions

Courseiva writes every 1Z0-829 question from scratch — 513 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.