Practice 1Z0-829 Java Platform Overview and Packaging questions with full explanations on every answer.
Start practicing
Java Platform Overview and Packaging — choose a session length
Free · No account required
Click any question to see the full explanation and answer options, or start a focused practice session above.
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?
2A 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'?
3A 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?
4A 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?
5A Java 17 application is packaged as a JAR with a Main-Class manifest entry. The JAR is run using 'java -jar app.jar'. However, the application throws a NoClassDefFoundError for a class that is inside the JAR. What is the most likely cause?
6Which TWO statements are true about Java modules in Java 17? (Choose two.)
7Which THREE are valid ways to package a Java 17 application for distribution? (Choose three.)
8A 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?
9A developer receives the above error when running a modular Java application. What is the most likely cause?
10A 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?
11Which TWO statements are true about the Java Platform Module System (JPMS) introduced in Java 9?
12A developer runs the command above on a JAR file. Which statement accurately describes the module myapp?
13A 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?
14Which TWO statements about the Java Platform Module System (JPMS) are true? (Choose two.)
15Given 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`?
16A 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?
17Arrange the steps to read a file using NIO.2 Files.lines() in Java.
18Match each Java 17 feature to its description.
19A 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?
20A 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?
21An 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?
22A 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?
23A 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?
24A 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?
25Which command creates a custom runtime image containing only the modules needed by an application, reducing the size of the JRE?
26A 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?
27An 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?
28Which TWO statements are true about the Java module system?
29Which THREE are valid Java commands for launching a modular application?
30Which TWO are characteristics of a multi-release JAR (MR-JAR)?
31A developer runs the above jdeps command on app.jar. Which statement about the dependencies is correct?
32Given the module descriptor and invocation, what will happen?
33A developer runs `java --list-modules` and sees the above output on a standard JDK installation. What does this output represent?
34A 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?
35In a modular Java application, where does the module declaration file typically reside?
36A developer wants to create an executable JAR file. Which jar command option is used to specify the main class?
37A developer places a non-modular JAR file on the module path. What type of module does this JAR become?
38A 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?
39Given 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?
40A 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?
41A 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?
42A 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?
43Which TWO statements about Java module types are true?
44Which THREE statements about the jpackage tool are true?
45Which TWO statements about module descriptors are true?
46Refer 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?
47Refer to the exhibit. Which statement is true about the com.example.app.internal package?
48Refer to the exhibit. The module path is correctly set to include the JAR containing the module. What is the most likely issue?
49A 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?
50An 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?
51A 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?
52A 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?
53A 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?
54A 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?
55A 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?
56A 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?
57Which TWO statements are true about the Java module system (JPMS) as of Java 17?
58Which TWO are valid uses of the 'jmod' tool in Java 17?
59Which THREE statements are true about the Java Platform editions? (Select three.)
60You 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?
61You 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?
62You 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?
63A 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?
64A 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?
65A 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?
66A developer needs to compile and execute a Java application on a server. Which of the following environments is sufficient to perform both tasks?
67Which two statements are true about Java module declarations? (Choose two.)
68Which statement is true about the result of executing the jlink command shown in the exhibit?
69A 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?
The Java Platform Overview and Packaging domain covers the key concepts tested in this area of the 1Z0-829 exam blueprint published by Oracle. Courseiva provides free domain-focused practice, mock exams, missed-question review, and readiness tracking across all 1Z0-829 domains — no account required.
The Courseiva 1Z0-829 question bank contains 69 questions in the Java Platform Overview and Packaging domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the Java Platform Overview and Packaging domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included