Question 94 of 509
Java Platform Overview and PackagingeasyMultiple ChoiceObjective-mapped

Quick Answer

The correct action is to add `--bind-services` to the jlink command. This is necessary because `jdk.crypto.cryptoki` is a service provider module that implements the Java Cryptography Architecture (JCA) as a service; without `--bind-services`, jlink only includes modules explicitly named in `--add-modules` and their direct dependencies, but it does not automatically resolve service provider modules that are discovered via the ServiceLoader mechanism. The `javax.crypto.spec.SecretKeySpec` class resides in `java.base`, but its runtime availability depends on the service linkage provided by the `jdk.crypto.cryptoki` provider—without binding services, that linkage is missing, causing the `ClassNotFoundException`. On the 1Z0-829 exam, this tests your understanding of jlink’s module resolution behavior, specifically the distinction between explicit module dependencies and service-based dependencies. A common trap is assuming `--add-modules` alone covers all required modules, but service providers are only included when `--bind-services` is specified. Memory tip: “Bind the services to find the providers” — if your app uses ServiceLoader or JCA, always pair `--bind-services` with your jlink command.

1Z0-829 Java Platform Overview and Packaging Practice Question

This 1Z0-829 practice question tests your understanding of java platform overview and packaging. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A development team is working on a Java 17 application that must be packaged as a custom runtime image for deployment on a Linux server without a JDK installed. The application uses `java.base`, `java.logging`, and `java.sql` modules, and also requires the `jdk.crypto.cryptoki` module for hardware security module (HSM) integration. The team wants to minimize the image size while ensuring all necessary modules are included. They run `jlink --add-modules java.base,java.logging,java.sql,jdk.crypto.cryptoki --output myapp-runtime`. The resulting image runs the application but fails at startup with a `ClassNotFoundException` for `javax.crypto.spec.SecretKeySpec`. Which action should the team take to resolve the issue?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "minimum / minimize"

    Why it matters: Asks for the least resource use — fewest addresses, smallest subnet, lowest overhead. Eliminate over-provisioned options even if they would technically work.

Question 1easymultiple choice
Full question →

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

Add `--bind-services` to the jlink command to include service provider modules.

The `jdk.crypto.cryptoki` module is a service provider module that provides cryptographic services via the Java Cryptography Architecture (JCA). When using `jlink`, service provider modules are not automatically included unless `--bind-services` is specified, because `jlink` only includes modules directly referenced in the module graph. The `javax.crypto.spec.SecretKeySpec` class is part of `java.base`, but the actual provider implementation that makes it available at runtime is in `jdk.crypto.cryptoki`; without `--bind-services`, the service linkage is missing, causing the `ClassNotFoundException`.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Manually add the `java.security.jgss` module to the `--add-modules` list.

    Why it's wrong here

    Incorrect: SecretKeySpec is in java.base; adding jgss is not the direct fix.

  • Use the `--list-modules` option with jlink to verify which modules are included, then add any missing ones.

    Why it's wrong here

    Incorrect: This is a diagnostic step but not the action that resolves the issue; the team needs to include the missing services.

  • Add `ALL-MODULE-PATH` to the `--add-modules` list to include all available modules.

    Why it's wrong here

    Incorrect: This would include all modules, defeating the purpose of minimizing image size.

  • Add `--bind-services` to the jlink command to include service provider modules.

    Why this is correct

    Correct: --bind-services links service provider modules required by the specified modules, which may include necessary crypto implementations.

    Clue confirmation

    The clue word "minimum / minimize" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume adding the module name to `--add-modules` is sufficient, but they overlook that `jlink` requires `--bind-services` to include service provider modules that are discovered via the service loader mechanism.

Detailed technical explanation

How to think about this question

Under the hood, `jlink` creates a custom runtime image by resolving the module graph from the root modules specified with `--add-modules`. Service provider modules like `jdk.crypto.cryptoki` are not automatically treated as roots unless `--bind-services` is used, which tells `jlink` to also include modules that provide services required by the root modules. In real-world HSM integration, failing to use `--bind-services` leads to runtime errors where the JCA provider is not registered, even though the module's classes are present in the image.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related 1Z0-829 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 1Z0-829 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this 1Z0-829 question test?

Java Platform Overview and Packaging — This question tests Java Platform Overview and Packaging — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Add `--bind-services` to the jlink command to include service provider modules. — The `jdk.crypto.cryptoki` module is a service provider module that provides cryptographic services via the Java Cryptography Architecture (JCA). When using `jlink`, service provider modules are not automatically included unless `--bind-services` is specified, because `jlink` only includes modules directly referenced in the module graph. The `javax.crypto.spec.SecretKeySpec` class is part of `java.base`, but the actual provider implementation that makes it available at runtime is in `jdk.crypto.cryptoki`; without `--bind-services`, the service linkage is missing, causing the `ClassNotFoundException`.

What should I do if I get this 1Z0-829 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Are there clue words in this question I should notice?

Yes — watch for: "minimum / minimize". Asks for the least resource use — fewest addresses, smallest subnet, lowest overhead. Eliminate over-provisioned options even if they would technically work.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.