News for hackers. Stuff that matters.
Re:dotnet run app.cs by msgilligan on Thursday May 29, 2025 @05:59PM (#44130809)
With the latest EA release (EA 24) of JDK 25 [1], you no longer need the `--enable-preview`. You can also simplify the println to:

  void main() {
      IO.println("Hello, World!");
  }

JEP 445 has been followed by JEP 512 which contained minor improvements and finalizes the feature [2].

If you want to use 3rd-party libraries, I highly recommend trying JBang [3].

[1] https://jdk.java.net/25/release-notes

[2] https://openjdk.org/jeps/512

[3] https://www.jbang.dev

Re:dotnet run app.cs by ptx on Friday May 30, 2025 @04:03PM (#44139452)
Hmmm... Disappointing that the static methods are no longer imported as of JEP 512. I thought that was the whole point of the new IO class. If we can't write "println" we might as well just write "System.out.println".