1Z0-829 Java Platform Overview and Packaging Practice Question
Which THREE are valid Java commands for launching a modular application?
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
✓
java -p mods -m com.app
Options A, B, and D are correct. Option A uses the shorthand `-p` for module path and `-m` to specify the main module, which is valid. Option B explicitly specifies both classpath (--class-path) and module path (--module-path) along with the main module (--module), which is also valid. Option D uses the long form --module-path and --module with a main class specification (com.app/com.app.Main), which is correct. Option C is invalid because `-p classes` points to a directory that typically contains class files rather than modules, and the module `com.app` would not be found there. Option E is invalid because --add-modules is not needed when using -m; it adds the module to the root set unnecessarily and can cause conflicts.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
java -p mods -m com.app
Why this is correct
Short form: -p for module path, -m for module.
- ✓
java --class-path classes --module-path mods --module com.app
Why this is correct
Both classpath and module path can be used together.
- ✗
java -p classes -m com.app
Why it's wrong here
-p is for module path, not classpath; use --class-path for classes.
- ✓
java --module-path mods --module com.app/com.app.Main
Why this is correct
Correct syntax: --module-path then --module with main class.
- ✗
java -p mods --add-modules com.app -m com.app
Why it's wrong here
--add-modules is for additional modules, not for specifying main module; use -m.
Go deeper
Related to this question
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 →
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.