1Z0-829 Java Platform Overview and Packaging Practice Question
A team uses 'jlink' to create a custom runtime image for a modular application. They run the following command: 'jlink --module-path $JAVA_HOME/jmods:myapp --add-modules com.example.myapp --output myimage'. The application requires several non-Java native libraries (e.g., .so files) that are loaded via System.loadLibrary(). After creating the image, the application fails with an UnsatisfiedLinkError. What is the most likely cause?
⚠ Common exam trap
It's easy for candidates to assume `jlink` automatically includes all dependencies, including native libraries, but `jlink` only handles Java modules and ignores non-Java artifacts like native `.so` or `.dll` files.
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 native libraries were not included in the image; they must be manually copied or added using --add-modules and a custom module.
The `jlink` tool creates a runtime image that includes only Java modules and their dependencies, not native libraries (e.g., .so files). Native libraries must be manually placed into the image's library path (e.g., `lib/` or `bin/` directory) or packaged into a custom module that is added via `--add-modules`. The `UnsatisfiedLinkError` occurs because `System.loadLibrary()` cannot find the native library in the image's expected locations.
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 native library loading requires a module that exports the package containing the native method.
Why it's wrong here
Native libraries are loaded via library path; module exports affect Java-level accessibility.
- ✗
The --add-modules flag omitted transitive dependencies of com.example.myapp.
Why it's wrong here
jlink resolves transitive dependencies automatically; the missing native libraries are the issue.
- ✓
The native libraries were not included in the image; they must be manually copied or added using --add-modules and a custom module.
Why this is correct
jlink images only contain Java modules; native code must be placed in the appropriate directory (e.g., lib) or bundled via a module.
- ✗
The --module-path must also include the directories containing the native libraries.
Why it's wrong here
The module path is for Java modules, not native libraries.
Go deeper
Related to this question
About these practice questions
This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.