Add jep512 module: compact source files and instance main methods on JDK 25 and 27

Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 512 article,
including the measured launch order and a private-constructor difference between 25 and 27.

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:32:47 +00:00
parent 6b5a918278
commit e0cb6e83e2
34 changed files with 490 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
$ java src/Members.java
HELLO!
apple, banana, cherry
{apple=5, banana=6, cherry=6}
2.10
Point[x=3, y=4] is 5.0 from the origin
calls so far: 1
$ java src/WithArgs.java one two
args.length = 2
arg: one
arg: two
$ java src/InstanceMainInClass.java
hello from an instance field
this class is InstanceMainInClass, final? false
$ java src/NeedsImport.java (java.net.http is outside java.base: a normal import fixes it)
default HTTP version: HTTP_2
$ java src/NeedsModuleImport.java (or import the whole module)
default HTTP version: HTTP_2
$ java multi/App.java (App.java + Greeter.java in one directory)
Hello, multi-file source launcher (from a second file)