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
+22
View File
@@ -0,0 +1,22 @@
$ javac -d out src/Hello.java && java -cp out Hello
Hello, world
$ javap -p -cp out Hello
Compiled from "Hello.java"
final class Hello {
Hello();
void main();
}
$ javap -v -cp out Hello | grep -E 'major|flags'
major version: 69
flags: (0x0030) ACC_FINAL, ACC_SUPER
$ java Reflect (asks the loaded class)
name : Hello
final : true
public : false
package : '' (unnamed)
superclass : java.lang.Object
declared : [void Hello.main()]
constructors: [Hello()]