Add jpms-basics module: JPMS for working developers, exports vs opens, split packages, automatic modules, jdeps and jlink on JDK 25

Five modules built with plain javac/java/jdeps/jlink on Temurin 25.0.5.1. Sources, broken/ cases,
run.sh and captured transcripts in output/. README row added.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4XrpfdpsacrvqnrBM
This commit is contained in:
asmhatre
2026-11-26 20:53:17 +05:30
co-authored by Claude Sonnet 5.5
parent 1fb1455734
commit de2660e998
51 changed files with 953 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.acme.autoapp;
import com.legacy.lib.Util;
public class Main {
public static void main(String[] args) {
System.out.println(Util.shout("legacy"));
Module lib = Util.class.getModule();
Module me = Main.class.getModule();
System.out.println(lib + " automatic=" + lib.getDescriptor().isAutomatic());
System.out.println("descriptor exports = " + lib.getDescriptor().exports());
System.out.println("isExported(com.legacy.lib) = " + lib.isExported("com.legacy.lib")
+ ", isOpen = " + lib.isOpen("com.legacy.lib"));
System.out.println("legacy.lib reads " + me.getName() + " = " + lib.canRead(me));
}
}
+3
View File
@@ -0,0 +1,3 @@
module com.acme.autoapp {
requires legacy.lib; // the name the module system derived from legacy-lib-1.2.jar
}