Courseiva

1Z0-829 · domain

Java Platform Overview and Packaging

Practise Oracle Certified Professional Java SE 17 Developer 1Z0-829 Java Platform Overview and Packaging practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

68 questions18 easy28 medium22 hard

Focused practice

Practice Java Platform Overview and Packaging questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Java Platform Overview and Packaging

Java Platform Overview and Packaging questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common Java Platform Overview and Packaging exam traps

  • Answering from memory before reading the full scenario.
  • Missing a constraint such as cost, availability, security, scope or command context.
  • Choosing a broad answer when the question asks for the most specific fix.
  • Ignoring why the wrong options are tempting.

Question index

All Java Platform Overview and Packaging questions (68)

Click any question to see the full explanation, or start a practice session above.

1

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?

Hard
2

A company deploys a Java 17 application on a server with a custom runtime image created by jlink. The application uses the Java logging API (java.util.logging). The server administrator notices that the image size is approximately 45 MB. They need to reduce it further. Which jlink option would help exclude unnecessary locale data?

Medium
3

Which THREE statements about the jpackage tool are true?

Hard
4

A Java application is developed using Java SE 17. It uses only standard Java APIs and no external libraries. The application runs without errors in the development environment. When deploying to a production server, which minimal Java environment is sufficient?

Easy
5

A company has a legacy application consisting of multiple JAR files that run on Java 11. They plan to migrate to Java 17 and modularize the application using JPMS. However, some third-party libraries do not provide module-info.class files. What is the best approach to ensure the application can be modularized while maintaining compatibility with these libraries?

Medium
6

Which TWO are valid uses of the 'jmod' tool in Java 17?

Hard
7

A company runs a Java 17 microservice that reads stock market data from a WebSocket and processes it. The application is packaged as an executable JAR using Maven Shade Plugin. Recently, after a dependency update, the application started throwing 'javax.net.ssl.SSLHandshakeException: PKIX path building failed' when connecting to the WebSocket. The security team insists that no certificates should be imported into the default truststore. The application already includes a custom truststore file 'certs.jks' in the resources folder. The developer had been loading it programmatically but the new dependency uses a different SSL context. The application must trust the WebSocket server without modifying JVM defaults. Which action should be taken?

Hard
8

Refer to the exhibit. The resulting image directory includes a 'bin' directory with java launcher. When running the application, a NoClassDefFoundError occurs for a class from module com.example.lib. What is the most likely cause?

Hard
9

Given the output of `java --list-modules` from a Java 17 installation, which module is NOT included by default when using the `--release 17` flag with `javac`?

Hard
10

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?

Easy
11

A team is migrating a large monolithic Java 8 application to Java 17 using modules. They want to ensure that only the required packages are exported. Which tool should they use to analyze current dependencies and generate module descriptors?

Medium
12

A developer needs to compile and execute a Java application on a server. Which of the following environments is sufficient to perform both tasks?

Easy
13

A Java developer is building a modular application that uses only the `java.base` and `java.sql` modules. The application runs correctly with a full JDK 17 installation. The developer wants to distribute a minimal runtime image to reduce download size for end users. They have the application module JAR file and all dependencies are modular. The developer runs the command `jlink --module-path $JAVA_HOME/jmods:app --add-modules app --output myimage` but receives an error: "Error: java.sql module not found". What is the most likely cause of this error?

Easy
14

An organization has a monolithic Java application built with Java 8 and deployed on a traditional classpath. They are migrating to Java 17 and want to use the module system to improve encapsulation. They have a jar file 'legacy.jar' that contains packages under 'com.legacy' and does not have a module-info.class. Which approach should they take to allow other modules to depend on this jar?

Medium
15

A developer has a module named 'com.example.app' that exports a package 'com.example.api'. Another module 'com.example.client' requires 'com.example.app'. Which directive must be in the module-info.java of 'com.example.client'?

Easy
16

A developer runs 'java --list-modules' and sees the output above. Which command can be used to create a custom runtime image containing only the 'java.base' module?

Easy
17

Refer to the exhibit. The module path is correctly set to include the JAR containing the module. What is the most likely issue?

Easy
18

Which command creates a custom runtime image containing only the modules needed by an application, reducing the size of the JRE?

Easy
19

Which THREE are valid Java commands for launching a modular application?

Hard
20

Which TWO statements about the Java Platform Module System (JPMS) are true? (Choose two.)

Medium
21

You are a Java developer at a logistics company. Your team is maintaining a legacy Java 8 application that uses dozens of jars on the classpath. The company has decided to migrate to Java 17 and adopt the module system. As a first step, you are analyzing the application's dependencies using jdeps. You run 'jdeps -s -dotoutput /tmp/deps' on all jars. The output shows many dependencies labeled 'not found' for internal packages that belong to other jars in the application. The packages are correctly exported by the respective jars (which are on the classpath). You suspect that because the jars are on the classpath, jdeps cannot resolve inter-jar dependencies as modules. To get accurate dependency information, what should you do?

Medium
22

Which two statements are true about Java module declarations? (Choose two.)

Hard
23

A company uses jlink to create a custom runtime image. They want to reduce the image size by removing debug information. Which jlink option or plugin should they use?

Hard
24

A team is developing a large enterprise application using Java 17. The application consists of multiple modules: core (provides logging and configuration), services (business logic), and web (REST endpoints). The modules are packaged as separate JAR files and deployed on a server. During runtime, the web module throws a java.lang.ClassNotFoundException for a class that is part of the core module. The core module's module-info.java exports the package containing the missing class. The web module's module-info.java requires core. However, the services module also needs the same class but uses a different version of it, causing conflicts. The team decides to use the class path for the conflicting package and the module path for the rest. They add the conflicting JAR to the class path and keep the other JARs on the module path. After this change, the web module still cannot find the class, but the services module works fine. What is the most likely cause of the issue?

Hard
25

A developer creates a Java application that uses the new 'jpackage' tool to create an installer for Windows. The application is modular and has a main class declared in module-info. Which option is required to specify the main class when using jpackage?

Easy
26

A developer creates a module `com.example.app` that requires `java.sql` and `com.example.util`. The module is compiled and packaged into a JAR. When launching the application with `java --module-path app.jar:lib --module com.example.app`, it fails with `java.lang.module.ResolutionException: Module com.example.util not found`. What is the most likely cause?

Medium
27

A Java application packaged as a JAR file with a manifest containing `Main-Class: com.example.Main` is correctly run using `java -jar app.jar`. However, when run with `java -cp app.jar com.example.Main`, it throws a `NoClassDefFoundError` for a class `com.example.helper.Util`. What is the most likely cause?

Easy
28

Given two named modules where module com.example.app requires module com.example.lib, which packages of com.example.lib are readable by com.example.app?

Medium
29

Given the module descriptor for com.example.payment: module com.example.payment { exports com.example.payment; // does not require com.example.store } And the Main class is in the unnamed module (on the classpath). The invocation is: java --add-modules com.example.store --module-path mods -cp classes com.example.Main What will happen?

Hard
30

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?

Hard
31

Which TWO statements are true about the Java Platform Module System (JPMS) introduced in Java 9?

Easy
32

A developer runs the command above on a JAR file. Which statement accurately describes the module myapp?

Medium
33

Which TWO statements are true about the Java module system (JPMS) as of Java 17?

Medium
34

A company wants to distribute a Java desktop application with a bundled JRE for end users who may not have Java installed. Which tool should they use?

Medium
35

A developer wants to create an executable JAR file. Which jar command option is used to specify the main class?

Easy
36

A Java 17 application uses the Java Platform Module System (JPMS). The module 'com.example.service' exports 'com.example.service.api' and requires 'java.logging'. Another module 'com.example.client' requires 'com.example.service'. The client module cannot access the 'com.example.service.api' package. What is the most likely reason?

Hard
37

Which statement is true about the result of executing the jlink command shown in the exhibit?

Medium
38

A company uses CI/CD to build and package a Java 17 application. They want to produce a single executable JAR that includes all dependencies. Which tool should be used to achieve this?

Medium
39

A financial trading application is developed using Java 17 and the Java Platform Module System (JPMS). The application consists of 50 named modules, including third-party libraries that are automatic modules. The team uses jlink to create a custom runtime image for deployment on customer servers. They observe that the jlink process takes over 10 minutes and produces an image of 200 MB. They want to reduce both the build time and the image size. Which action would be most effective?

Hard
40

In a modular Java application, where does the module declaration file typically reside?

Easy
41

A developer receives the above error when running a modular Java application. What is the most likely cause?

Medium
42

A development team wants to ensure that a Java 17 application runs with a specific set of modules. They want to minimize the footprint by including only necessary modules. Which tool should they use?

Medium
43

A Java 17 application is deployed on a server. The application uses modules but one required module is missing from the module path. Which exception will be thrown at startup?

Hard
44

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?

Hard
45

A developer wants to include a module in a custom runtime image using jlink. The module's `module-info.java` does not explicitly export any packages. When running the application from the custom image, a ClassNotFoundException is thrown for a class from that module. What is the most likely cause?

Medium
46

A team is migrating a large legacy application from Java 8 to Java 17. The application consists of multiple JAR files that are placed on the classpath. Some of these JAR files have been updated to include module-info.class files, making them named modules. After migration, the application throws `IllegalAccessError` for several deep reflection calls that used to work in Java 8. The team has added `--add-opens` JVM flags to open the required packages, but the error persists. The application also uses a third-party library that is not modularized and is placed on the classpath. The team notices that the `--add-opens` flags are being ignored for packages in the modularized JARs. What is the most likely reason?

Medium
47

Which TWO statements about Java module types are true?

Medium
48

A developer has created a modular Java application. They want to distribute a minimal runtime image containing only the required modules. Which tool should they use?

Easy
49

A developer is migrating a classpath-based application to modules. They have two JARs on the classpath that both contain a package with the same name, com.example.util. When they move both JARs to the module path, they encounter a module resolution error. What is the most likely cause?

Hard
50

Which TWO statements are true about Java modules in Java 17? (Choose two.)

Medium
51

An application uses `--add-opens java.base/java.lang=ALL-UNNAMED` to allow reflective access to `java.lang` internals from the classpath. After migrating to a module, the flag is changed to `--add-opens java.base/java.lang=com.example.app`. Yet reflective access still fails with `InaccessibleObjectException`. What is the most likely reason?

Hard
52

Refer to the exhibit. Which statement is true about the com.example.app.internal package?

Medium
53

A developer places a non-modular JAR file on the module path. What type of module does this JAR become?

Easy
54

A Java 17 application is packaged as a modular jar and deployed on a system with the full JDK. The application uses the java.sql module. The system administrator wants to minimize the footprint by creating a custom runtime image using jlink. Which command would create an image with only the necessary modules?

Medium
55

Which TWO statements about module descriptors are true?

Medium
56

Which TWO statements are true about the Java module system?

Medium
57

A developer has written a Java class that uses external libraries packaged as JAR files. The application runs correctly when launched from an IDE but fails with a ClassNotFoundException when run from the command line using `java -cp`. What is the most likely cause?

Easy
58

Which THREE are valid ways to package a Java 17 application for distribution? (Choose three.)

Hard
59

You are a DevOps engineer at a software house. Your team is preparing a Java 17 application for deployment. The application is modular and consists of 12 modules. They have been using the 'jlink' tool to create a custom runtime image for Linux. The image works fine on the development machines. However, when deployed to a minimal Docker container based on Alpine Linux, the application fails with: 'Error: Could not find or load main class com.example.Main'. The main class is declared in the module 'com.example.app' and the module-path is correctly set within the image. The image's bin directory contains the launcher scripts generated by jlink. The Docker container has only the bare minimum libraries. You have verified that the 'modules' file exists in the lib directory and contains 'com.example.app'. What is the most likely cause?

Medium
60

Which TWO are characteristics of a multi-release JAR (MR-JAR)?

Easy
61

A developer runs `java --list-modules` and sees the above output on a standard JDK installation. What does this output represent?

Easy
62

Arrange the steps to read a file using NIO.2 Files.lines() in Java.

Medium
63

You are a software architect at a financial firm. Your team is developing a modular Java 17 application that comprises several modules: 'com.bank.core' (provides core banking services), 'com.bank.web' (REST API), and 'com.bank.persistence' (database access). The application uses the 'java.sql' module for JDBC and 'java.logging' for logging. The team uses Maven for dependency management. The application has an external dependency on the 'com.fasterxml.jackson.databind' library (Jackson) for JSON processing, which is provided as a non-modular jar. The Jackson jar is placed on the module path. The application modules are all named modules with module-info files. At runtime, the 'com.bank.web' module requires 'com.bank.core' and 'com.fasterxml.jackson.databind' (the automatic module). The 'com.bank.core' module requires 'java.sql' and 'java.logging'. When the application runs, it throws an 'IllegalAccessError' indicating that the module 'com.bank.core' tries to access a class from 'com.fasterxml.jackson.databind' but the module does not read it. Yet, 'com.bank.web' is the only module that explicitly requires Jackson. What is the most likely cause and the correct resolution?

Hard
64

Which THREE statements are true about the Java Platform editions? (Select three.)

Medium
65

Match each Java 17 feature to its description.

Medium
66

A developer runs 'jdeps -s --module-path lib myapp.jar' and gets output: 'myapp.jar -> java.base, myapp.jar -> java.sql, myapp.jar -> notfound'. What does the 'notfound' entry indicate?

Hard
67

A developer runs the above jdeps command on app.jar. Which statement about the dependencies is correct?

Medium
68

An application built with Java 17 uses a third-party library that internally uses `sun.misc.Unsafe`. The application runs without errors on Java 8 but throws an `IllegalAccessError` on Java 17. What is the most likely reason?

Hard

Frequently asked questions

What does the Java Platform Overview and Packaging domain cover on the 1Z0-829 exam?
Java Platform Overview and Packaging questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 68 Java Platform Overview and Packaging questions in the 1Z0-829 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Java Platform Overview and Packaging questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
oracle-ocp-java17 ORACLE-OCP-JAVA17 java platform Practice Questions