# 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.