Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 513 article, including the JDK 25 vs 27 compiler wording differences. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
20 lines
592 B
Plaintext
20 lines
592 B
Plaintext
$ javac --release 21 broken/OnJdk21.java (25.0.4.1+1)
|
|
OnJdk21.java:7: error: flexible constructors is not supported in -source 21
|
|
super(name.strip());
|
|
^
|
|
(use -source 25 or higher to enable flexible constructors)
|
|
1 error
|
|
exit=1
|
|
|
|
$ javac --release 24 broken/OnJdk21.java (25.0.4.1+1)
|
|
OnJdk21.java:7: error: flexible constructors is not supported in -source 24
|
|
super(name.strip());
|
|
^
|
|
(use -source 25 or higher to enable flexible constructors)
|
|
1 error
|
|
exit=1
|
|
|
|
$ javac --release 25 broken/OnJdk21.java (25.0.4.1+1)
|
|
exit=0
|
|
|