Maybe my favorite feature in this release:<p><a href="https://openjdk.org/jeps/463" rel="nofollow">https://openjdk.org/jeps/463</a><p>Finally solves the inscrutable Hello World program!<p>Yes, it's just ergonomics for early beginners. But could be the difference in whether or not someone new to programming sticks with Java or not.
It isn't a "Sexy" PL change, but a full foreign function interface will be a huge change. In my experience, relying on the old java JNI based libraries seems to be one of the biggest things that break in upgrades. So I am hoping this will reduce the maintenance burden of Java.
Linkable features <a href="https://openjdk.org/projects/jdk/22/" rel="nofollow">https://openjdk.org/projects/jdk/22/</a><p>For me personally the most interesting one is JEP461 (Stream Gatherers) <a href="https://openjdk.org/jeps/461" rel="nofollow">https://openjdk.org/jeps/461</a><p>This will allow addition of interesting stream operations.
Although I like Kotlin better, I'm really impressed how Oracle continues to improve Java. Some developers think Java is an old, cumbersome language, but it is indeed such a productive language and ecosystem with outstanding quality! Java has quite good support for functional programming, concise and immutable structs (called "records"), pattern matching, string templating, virtual threads, structured concurrency (preview for now), a vast ecosystem with outstanding quality, world class documentation, a fast and robust runtime and so on.<p>Even after nearly 30 years, Java is still a good choice to start something new (e.g. a startup).
Foreign Function Interface is one of the key advantages what C# had over Java (e.g. against huge APIs like Android or macOS). I am really curious how this JEP turns out.
It's kind of startling to see how many places still use Java 8, estimated at ~1/3 of projects according to a survey i just googled. And something like half that still use java 11.
Examples [1] of these features.<p>[1]: <a href="https://www.happycoders.eu/java/java-22-features/" rel="nofollow">https://www.happycoders.eu/java/java-22-features/</a>
Now this may seem like a silly question, but if I only want to run Java apps on macOS, what should I install from MacPorts? Searching for "JRE" gives no results. Searching for OpenJDK gives various options including:<p>- OpenJDK21: <a href="https://ports.macports.org/port/openjdk21/details/" rel="nofollow">https://ports.macports.org/port/openjdk21/details/</a> ,
- openjdk21-zulu: <a href="https://ports.macports.org/port/openjdk21-zulu/details/" rel="nofollow">https://ports.macports.org/port/openjdk21-zulu/details/</a>
- openjdk21-oracle: <a href="https://ports.macports.org/port/openjdk21-oracle/details/" rel="nofollow">https://ports.macports.org/port/openjdk21-oracle/details/</a><p>each of them having <i>so many variants</i> (see the links). What variant needs to be installed to just run a Java app?
So does this fix the crashing issue with macOS Sonoma 14.4? <a href="https://arstechnica.com/gadgets/2024/03/usb-hubs-printers-java-and-more-seemingly-broken-by-macos-14-4-update/" rel="nofollow">https://arstechnica.com/gadgets/2024/03/usb-hubs-printers-ja...</a>