Files
javademos/jep512/README.md
T
Claude e0cb6e83e2 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
2026-09-24 10:32:47 +00:00

19 lines
1.0 KiB
Markdown

# jep512 — Compact Source Files and Instance Main Methods (JEP 512, final in Java 25)
Companion code for the ankurm.com article **Compact Source Files and Instance Main Methods in Java 25 (JEP 512)**. All explanation lives in the
article; this folder holds only the runnable sources and the transcripts they produced.
```bash
JDK25=/path/to/jdk-25 JDK27=/path/to/jdk-27 [JDK21=/path/to/jdk-21] ./run.sh # regenerates output/*.txt
java src/Hello.java # or just run one
```
| Folder | What is in it |
|---|---|
| `src/` | programs that run (`java src/Name.java`) |
| `broken/` | sources that fail on purpose; the compiler's own message is captured in `output/06-*.txt` and `output/07-*.txt` |
| `multi/` | `App.java` + `Greeter.java`: the source launcher finding a second file in the same directory |
| `output/` | every transcript quoted in the article (`01`-`08`) |
Machine-independent apart from the JDK build lines. Tested on Temurin 25.0.4.1+1 and Temurin 27+35.