Java Digest May 2024
Welcome back to Java Digest! Here, you will find a concise overview of releases and news around the Java platform that took place in May 2024. The digest also includes a selection of guides, talks, and articles worth checking out to stay au courant with the Java trends.
By the way, I updated the format of the digest slightly. Author’s picks on what to watch and read come first, followed by Java-relevant releases and news.
To Watch: Video Tutorials and Talks
- Getting Started with GPT-4o in Java — Dan Vega provides a step-by-step tutorial on building a Java application that talks to OpenAI’s newest model, GPT-4o.
- Running Uncensored and Open Source LLMs on Your Local Machine — Kenneth Kousen discusses the Ollama system, which enables the developers to download and run open-source models on their local hardware, and how to access it using the newest Java features.
- Do you really need Hibernate? — Simon Martinelly shows the power of jOOQ, a database-mapping software library in Java, on a data-centric Java application.
- Debug your native Java — Dmitry Chuyko shows how to conveniently debug native images using specific native image debugging tools.
- Breaking AI: Live coding and hacking applications with Generative AI — Simon Maple and Brian Vermeer live hack a Spring Boot application written with the help of AI tools, showing how trusting AI-generated code carelessly may increase the security risks.
To Read: Java and Spring Guides and Tips
- Java Runtimes: Insights from the Spring Boot Point of View — Aleksey Stukalov and I discuss various metrics that you can use to choose a suitable Java runtime for your Spring Boot application.
- How to create Java container images on a developer machine for other architectures — Dmitry Chuyko provides a step-by-step tutorial on creating Java container images in a Linux virtual machine on macOS and Windows.
- The TornadoVM Programming Model Explained — Juan Fumero explains how Java developers can interact with the TornadoVM API to accelerate parts of their Java programs on heterogeneous software.
Notable Releases Around Java: Frameworks, Technologies, Tools
Every month there are numerous releases of tools, libraries, and frameworks used in Java development. The sheer amount of Java-related solutions is so immense that it is impossible to mention them all in a short News Roundup. So my goal is to provide a summary of key or brand-new technologies if I encounter any:
- It was a month of bloom in the Spring ecosystem: the team made available numerous releases of Spring Framework, Spring Boot, Spring Security, Spring Modulith, Spring Batch, Spring Session, Spring Integration and other projects. The whole list of releases can be found on the Spring blog. My personal take is Spring Boot 3.3 with loads of enhancements and new features, including CDS support.
- IntelliJ IDEA 2024.1.2
- Apache Maven 4.0.0-beta-3
- langchain4j (a cool novel library for easier AI/LLM integration into Java apps) 0.31.0
- Regression Test Harness for the JDK, jtreg, version 7.4.0
- Quarkus 3.10, 3.10.1, and 3.10.2
- Micronaut 4.4.2 and 4.4.3
- Hibernate ORM 6.6.0 alpha1, Hibernate ORM 7.0.0 alpha2, the first alpha release of Hibernate Search 7.2.0 alpha1, Hibernate Reactive 2.3.0.Final
- TornadoVM 1.0.4
- JHipster 8.4.0
- Apache Tomcat 10.1.24, 11.0.0-M20, and 9.0.89
- Vaadin 24.3.12
- JobRunr 7.1.1
- Testcontainers for Java 1.19.8
- Micrometer Metrics 1.13.0, Micrometer Tracing 1.3.0
- Open Liberty 24.0.0.5
News
New JEPs targeted to JDK 23
A whole bunch of JEPs will make it into JDK 23! 7 new JEPs (in addition to the ones we discussed in the previous Roundup episodes) were added to the next feature release:
- JEP 467: Markdown Documentation Comments will make it easier to read and write JavaDoc documentation by enabling developers to use Markdown syntax alongside HTML and JavaDocs tags.
- JEP 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal will prepare the Java platform for the removal of the memory-access methods in sun.misc.Unsafe, which have been superseded by the VarHandle API and the Foreign Function & Memory API.
- JEP 474: ZGC: Generational Mode by Default switches the default mode of the Z Garbage Collector (ZGC) to the generational mode, which is more efficient than non-generational mode in most cases.
- JEP 476: Module Import Declarations (Preview) simplifies Java library imports by allowing the developers to import the entire module at once (for instance, import module java.base instead of import java.io.*, import java.lang.*, import java.util.* and so on).
- JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview) brings several enhancements to the feature first delivered in JDK 21. The feature makes it easier for beginners to write small, simple Java programs without using advanced Java concepts.
- JEP 480: Structured Concurrency (Third Preview) re-previews without changes the feature aimed at improving reliability and observability of multithreaded code by treating related tasks in different threads as a single unit of work.
- JEP 481: Scoped Values (Third Preview) re-previews the feature introduced in JDK 20, which allows for sharing immutable data between a caller method and its callees.
- JEP 482: Flexible Constructor Bodies (Second Preview) re-previews the feature introduced in JDK 22 as Statements before super(…). The feature enables the developers to place statements before an explicit constructor invocation, thus reducing verbosity.
Build 24 of OpenJDK JDK 23 Early-Access Builds is available if you can’t wait to dig into the new functionality of Java.
Several JEPs were promoted to Candidate status
Several JEPs were promoted from JEP Draft to Candidate:
- JEP 472: Prepare to Restrict the Use of JNI will issue warnings about the usage of JNI to prepare the developers for future JNI restriction in future releases. The same restrictions concern the Foreign Function and Memory API. In the future, native access will be restricted by default and should be granted explicitly by an application developer.
- JEP 478: Key Derivation API (Preview) will introduce a standard Java API allowing for the creation of cryptographically strong keys using the Key Derivation Functions. Together with the Key Encapsulation Mechanism API introduced in JDK 21, the Key Derivation API prepares the ground for the support of quantum-safe encryption algorithms in Java.
- JEP 479: Remove the Windows 32-bit x86 Port will remove the source code and build support for the Windows 32-bit x86 port, whose End of Life is due in October 2025. However, the JEP will not remove code or support for Windows 32-bit in previous releases.
New Relic released the 2024 State of the Java Ecosystem Report
New Relic issued its annual report on the state of the Java ecosystem. The report summarizes current tendencies in the Java world based on the data from hundreds of thousands of Java applications.
According to the report, newer Java versions are getting adopted much faster than in the case of legacy LTS versions such as JDK 21. For instance, Jaa 17 is used in 35% of apps and is considered the most popular Java version. Java 21 is used in 1.4% of applications, but the adoption is growing.
Java turned 29
Our beloved Java turned 29 on May 23! 29 years is a respectful age for any technology, but Java shows no signs of weariness at all. On the contrary, it’s getting more efficient, developer-friendly, and versatile with every release. My colleague and friend Pasha Finkelshteyn told a very personal story of his relationship with Java throughout the years. I haven’t been in tech for that long, I must admit. My Java story dates back only about five years, and I haven’t had vast experience with other programming languages. But it’s the vibrant community around Java that I love most. It feels so good being around so many Java enthusiasts that share their experience, exchange knowledge and cooperate on making Java better, that I don’t want to wander off anywhere else!
Oracle reconfirms extended support for Java 11
Oracle reconfirmed in its Java SE Spring 2024 Roadmap Update that it will support Java 11 through at least January of 2032. The company will also support Java SE 8 and Java SE 11 until at least December 2030 and January 2032 respectively, which extends Oracle Java support on Solaris by an additional six years past the dates announced in 2019.
Other support updates include:
- Advanced Management Console (AMC) will be supported through October 2024. There will be no updates to AMC after that, as Oracle is focused on developing Java Management Service (JMS), a similar next-generation solution.
- Commercial support for JavaFX on JDK 8 is planned to end in March 2025. The following Java 8 builds will no longer include JavaFX. However, Oracle continues developing the technology as part of an open-source OpenJFX project, and many OpenJDK distributions include the OpenJFX bundle.
- Free updates to Oracle Java 17 under the NFTC license will cease after September 2024. The following updates to Oracle Java 17 will be covered by the OTN license. It means that if you use JDK 17 in production or for other commercial purposes, you should migrate to Oracle Java 21 to continue receiving free updates, acquire a license for Oracle Java 17, or migrate to OpenJDK.
Spring I/O 2024
The absolute highlight for all Java developers using the Spring framework was the annual Spring I/O Conference that took place in Barcelona on May 30–31. I couldn’t attend the event so I can’t share my personal experience, but judging by what I saw in the X newsfeed, the degree of awesomeness went into overdrive! The keynote is already available on YouTube, so if you missed the conf like me, you can get a sneak peek of the atmosphere :)