All fields

“Java Platform Module System (JPMS)” in Information Technology

18 questions across 1 technology.

Information Technology

18 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is the Java Platform Module System (JPMS, introduced in Java 9), and what core problem does it aim to solve compared to the traditional classpath-based approach? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Beginner
2How do the requires and exports directives in a module-info.java file work together to define a module's dependencies and public API surface? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
3How would you write and run a basic 'Hello World' JPMS-modularized application from scratch, including the module-info.java, directory structure, and the specific javac/java command-line invocations needed? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
4What is the difference between 'requires' and 'requires transitive', and how does transitive dependency propagation work in the module system? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Advanced
5How do you name a Java module, and what naming convention is recommended to avoid conflicts with other modules? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Beginner
6What is the difference between 'exports' and 'opens' in a module-info.java file, and why does reflection-heavy code (like many dependency injection or serialization frameworks) specifically require the latter? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
7How does the 'unnamed module' work, and how does JPMS maintain backward compatibility with the vast ecosystem of pre-existing JARs that were never designed with modules in mind? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Advanced
8How would you use jlink to create a custom, minimal Java runtime image containing only the specific modules an application actually needs, and what deployment benefits does this provide? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Advanced
9How does JPMS's strong encapsulation interact with reflection-heavy frameworks and libraries that predate the module system, and what specific JVM flags (like --add-opens) exist as an escape hatch for cases where proper module declarations aren't feasible? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Advanced
10What is an automatic module, and how does placing a plain (non-modularized) JAR on the module path (rather than the classpath) differ from leaving it on the classpath as part of the unnamed module? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
11What are the practical trade-offs and adoption challenges that have led many real-world Java projects to NOT fully adopt JPMS modularization even years after its introduction, despite its stated benefits? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
12What is a qualified export (exports package to specificModule), and when would you use it instead of a plain, unqualified export? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
13How does the ServiceLoader/Service Provider Interface pattern integrate with JPMS using the 'uses' and 'provides ... with' directives, replacing the older META-INF/services file-based mechanism? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Intermediate
14How would you diagnose and resolve common JPMS migration errors, such as 'package is not visible' or a split package conflict, when modularizing an existing large application? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Advanced
15How would you use the 'requires static' directive to declare an optional, compile-time-only dependency that isn't required to be present at runtime? Java › Java Platform Module System (JPMS)JavaJava Platform Module System (JPMS)Advanced
16How does the Java Platform Module System (JPMS, introduced in Java 9) change class loading and encapsulation compared to the traditional classpath model? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationIntermediate
17How does the ServiceLoader mechanism (java.util.ServiceLoader) provide a standardized way to discover and load implementations at runtime without hardcoding class names, and how does it relate to class loading? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationIntermediate
18How would you diagnose and resolve a 'split package' problem when using JPMS, where the same package is defined across two different modules on the module path? Java › Class Loading & Bytecode VerificationJavaClass Loading & Bytecode VerificationAdvanced