Files
javademos/jep512/output/02-javac-and-javap.txt
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

23 lines
491 B
Plaintext

$ 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()]