Add jep511 module: module import declarations on JDK 25 and 27

Runnable sources, deliberate compile failures, three small modules and nine captured transcripts for import module (JEP 511).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
This commit is contained in:
Claude
2026-09-24 10:57:57 +00:00
parent 2ebea58d39
commit 385cc25233
44 changed files with 715 additions and 0 deletions
@@ -0,0 +1,71 @@
$ java --describe-module java.sql (25.0.4.1+1-LTS)
[email protected]
exports java.sql
exports javax.sql
requires java.xml transitive
requires java.logging transitive
requires java.transaction.xa transitive
requires java.base mandated
uses java.sql.Driver
$ java --describe-module java.se | grep -c 'requires' (25.0.4.1+1-LTS)
20
$ java --describe-module java.se | grep -c exports (25.0.4.1+1-LTS)
0
$ javac src/Transitive.java && java Transitive (25.0.4.1+1-LTS)
demo
0
java.xml
[java.base needed its own import]
$ javac src/Transitive.java && java Transitive (27+35)
demo
0
java.xml
[java.base needed its own import]
$ javac broken/SqlDoesNotGiveBase.java (25.0.4.1+1-LTS)
broken/SqlDoesNotGiveBase.java:5: error: cannot find symbol
List<String> l = List.of("x"); // java.util.List lives in java.base
^
symbol: class List
location: class SqlDoesNotGiveBase
broken/SqlDoesNotGiveBase.java:5: error: cannot find symbol
List<String> l = List.of("x"); // java.util.List lives in java.base
^
symbol: variable List
location: class SqlDoesNotGiveBase
2 errors
$ javac broken/SqlDoesNotGiveBase.java (27+35)
broken/SqlDoesNotGiveBase.java:5: error: cannot find symbol
List<String> l = List.of("x"); // java.util.List lives in java.base
^
symbol: class List
location: class SqlDoesNotGiveBase
broken/SqlDoesNotGiveBase.java:5: error: cannot find symbol
List<String> l = List.of("x"); // java.util.List lives in java.base
^
symbol: variable List
location: class SqlDoesNotGiveBase
2 errors
$ javac src/JavaSe.java (25.0.4.1+1-LTS)
src/JavaSe.java:1: error: unnamed module does not read: java.se
import module java.se;
^
1 error
$ javac src/JavaSe.java (27+35)
src/JavaSe.java:1: error: unnamed module does not read: java.se
import module java.se;
^
1 error
$ javac --add-modules java.se src/JavaSe.java && java JavaSe (25.0.4.1+1-LTS)
[a] x 0
$ javac --add-modules java.se src/JavaSe.java && java JavaSe (27+35)
[a] x 0