18 questions for “Java Platform Module System (JPMS)”

Found in 1 field. Select a question to see its full answer.

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