Loading…
Loading…
Topic
Articles and problems tagged Java Modules.
Module types for the OCP 21 exam: named, automatic and unnamed modules, how automatic module names are derived from the manifest or JAR file name, what each type exports and reads, bottom-up and top-down migration, splitting a project, and cyclic dependencies.
The module tools for the OCP 21 exam: built-in java and jdk modules, java --describe-module, --list-modules and --show-module-resolution, jar --describe-module, jdeps with -summary and --jdk-internals, jmod modes, jlink runtime images and jpackage installers, with every option form.
Module services for the OCP 21 exam: the service provider interface, service locator, consumer and service provider, the uses and provides directives, ServiceLoader load, findFirst and stream with Provider, the rules for provider classes, and which directives each part needs.
The module-info.java directives for the OCP 21 exam: exports and qualified exports, what exporting a package really exposes, requires, requires transitive and implied readability, requires static, duplicate and cyclic requires, and opens, opens to and open modules for reflection.
Your first Java modules for the OCP 21 exam: why the module system exists, its benefits, writing module-info.java, the folder layout, compiling with javac -p and -d, running with java -p and -m, packaging a module JAR, and connecting two modules with exports and requires.
How the Java Authentication and Authorization Service logs users in: LoginContext, login configurations, the REQUIRED/REQUISITE/SUFFICIENT/OPTIONAL flags, writing a LoginModule with two-phase commit, callback handlers, Subjects and principals, Subject.callAs, and life after the Security Manager.
Finish the Java module system: requires transitive and aggregator modules, requires static, qualified exports and opens, ServiceLoader with uses and provides, then jdeps, jlink custom runtime images and JMOD files, with a complete runnable example.
Migrate Java applications to modules step by step: automatic modules from plain JARs, how their names are derived, Automatic-Module-Name, the unnamed module and class path, bottom-up migration, and the --add-exports, --add-opens and @argfile launcher options.
Package Java modules as modular JARs with jar, --module-version and a main class, then learn why deep reflection fails across modules and fix it with opens, open modules, resource access rules and MethodHandles.Lookup.
Declare Java module dependencies with requires and publish packages with exports: the "package is not visible" error, the module graph and readability, why requires is not transitive, hiding implementation packages, compiling and running multi-module apps, and split packages.
Get started with the Java Platform Module System (JPMS): why modules exist, strong encapsulation and reliable configuration, how to name modules, write module-info.java, compile a modular Hello World and run it with --module-path and --module.