Loading topic
module-info.java, you need to know what it replaces. This chapter covers the problems the classpath has, how each one shows up in real projects, and which part of JPMS addresses it.5 min readjavac and java, and understand what a jar file and the classpath are. Basic familiarity with reflection an4 min readmodule-info.java, know what a package and a public type are, and can run javac and java from a terminal. You should also know what the module path is, at the level of "a place where the tools look for modules." Here you learn how one module states t5 min readmodule-info.java with requires, and that you compile and run modules with javac and java on the module path. Here you will learn how exports decides which packages form a module's public API, what it does and doesn't expose, and which mistakes cau4 min readmodule-info.java with requires and exports, and that you can compile with javac and run with java --module-path. Here you will learn how the requires declarations of many modules combine into one graph, and how that graph decides which code can 4 min readjavac and java run programs, and what a jar and the classpath are. It also assumes basic familiarity with reflection. You should have seen module-info.java with requires and exports.5 min readjavac and java, and that you know what a jar file is. It also assumes you have read the earlier chapters on module-info.java, requires, and exports. Here you will turn those descriptors into a working build: compile several modules4 min readmodule-info.java, know what requires and exports do, and can compile and run on the module path. Here you will see how the JDK itself is built from modules, why every module depends on java.base, and how to find which JDK modules your code needs.4 min readmodule-info.java, you know what requires and exports do, and you can compile modules with javac --module-source-path. It covers requires transitive, which lets a module pass its own dependencies on to the modules that depend on it.4 min readmodule-info.java with requires and exports. It also assumes you know what the module path is and how javac compiles several modules together. If exports still feels unfamiliar, review the chapter on exporting packages first.4 min readexports and requires work, what strong encapsulation means, and the basics of java.lang.reflect. You should also know what setAccessible(true) does on the classpath.4 min readmodule-info.java with requires and exports, and that you have compiled and run modules from the module path. It also assumes you know Java interfaces.3 min readmodule-info.java works, how requires and exports shape the module graph, and what the classpath is. It covers what happens to code that is not in a named module, and how that code interacts with modules.4 min readmodule-info.class, but the runtime still treats it as a named module. Automatic modules let a modular application depend on libraries that have not been modularized yet.5 min readmodule-info.java, compile with --module-source-path, and run from the module path. You should also know the difference between named, automatic, and unnamed modules from the previous chapters.4 min readmodule-info.java, requires, exports and opens work. It also assumes you have run java with --module-path, and that you know what a jar and the classpath are. The goal is to move a classpath application to modules in small steps, with the application work5 min readmodule-info.java, know the difference between the classpath and the module path, and have seen automatic modules and the unnamed module. jdeps is the JDK's static dependency analyzer. It reads compiled .class files and jars and reports what they depend on. 4 min readjlink, the JDK tool that assembles a trimmed Java runtime from the modules your application needs. It assumes you can write a module-info.java, compile on the module path, and read requires and provides directives. You should also know what jdeps reports, because it fee4 min readmodule-info.java, requires, exports, the module path, and ServiceLoader with uses and provides. Everything so far resolved modules once, at startup. Layers let a running program resolve and load more modules later.4 min read