Summary
-------
The Simple Source Files and Instance Main Methods JEP (formerly known as
Implicitly Declared Classes and Instance Main Methods), will re-preview for JDK
24. This JEP, also introduces a simpler way of doing I/O in a program, which is
more aligned with the philosophy of the JEP-to enable a smooth on-ramp to Java
programming. This functionality is currently implemented in the `java.io.IO`
class.
Problem
-------
The Simple Source Files and Instance Main Methods feature depends on module
imports, which is planned to re-preview for JDK 24. Since this JEP introduces
`java.io.IO`, allowing this new class to be tested under real-world conditions
is highly desirable.
As a consequence, we propose to re-preview Simple Source Files and Instance Main
Methods for JDK 24.
Solution
--------
The Simple Source Files and Instance Main Methods feature, and `java.io.IO` will
re-preview for JDK 24. No significant changes are proposed under this CSR, other
than small JLS improvements and clarifications. A separate change(s) to simple
IO may be covered by separate CSR(s).
Specification
-------------
The current draft of the JLS is attached as "Simple Source Files and Instance
main Methods (Fourth Preview) - JLS.pdf", and is also available for convenience
here:
https://cr.openjdk.org/~gbierman/jep495/jep495-20241024/specs/simple-source-files-instance-main-methods-jls.html
The current draft of the JVMS is attached as "Simple Source Files and Instance
main Methods (Fourth Preview) - JVMS.pdf", and is also available for convenience
here:
https://cr.openjdk.org/~gbierman/jep495/jep495-20241024/specs/simple-source-files-instance-main-methods-jvms.html