BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Java News Roundup: Java Turns 29, Kotlin 2.0, Semantic Kernel for Java 1.0, More OpenJDK Updates

Java News Roundup: Java Turns 29, Kotlin 2.0, Semantic Kernel for Java 1.0, More OpenJDK Updates

This week's Java roundup for May 20th, 2024, features news highlighting: Java's 29th birthday; the release of Kotlin 2.0 and Semantic Kernel for Java 1.0; JEP 477, Implicitly Declared Classes and Instance Main Methods (Third Preview), targeted for JDK 23; and four JEPs proposed to target for JDK 23

Java Turns 29

On May 23rd, 1995, Java 1.0 was introduced to developers who attended the Sun World ‘95 conference. A Java community was born and 29 years later, the community has evolved to include 370 global Java User Groups, 370 Java Champions and many Java-related conferences in a given calendar year. There have been 22 formal releases.

At Devnexus 2024, Sharat Chander, senior director, Product Management & Developer Engagement at Oracle, announced that JavaOne will return to celebrate Java's 30th birthday. It will be held March 17-20, 2025 in Redwood Shores, California. Please stay tuned for the call for papers.

OpenJDK

After its review has concluded, JEP 477, Implicitly Declared Classes and Instance Main Methods (Third Preview), has been promoted from Proposed to Target to Targeted for JDK 23. Formerly known as Unnamed Classes and Instance Main Methods (Preview), Flexible Main Methods and Anonymous Main Classes (Preview) and Implicit Classes and Enhanced Main Methods (Preview), this JEP incorporates enhancements in response to feedback from the two previous rounds of preview, namely JEP 463, Implicit Classes and Instance Main Methods (Second Preview), delivered in JDK 22, and JEP 445, Unnamed Classes and Instance Main Methods (Preview), delivered in JDK 21. This JEP proposes to "evolve the Java language so that students can write their first programs without needing to understand language features designed for large programs." This JEP moves forward the September 2022 blog post, Paving the on-ramp, by Brian Goetz, Java language architect at Oracle. The latest draft of the specification document by Gavin Bierman, consulting member of technical staff at Oracle, is open for review by the Java community. More details on JEP 445 may be found in this InfoQ news story.

JEP 482, Flexible Constructor Bodies (Second Preview), has been promoted from Candidate to Proposed to Target for JDK 23. This JEP proposes a second round of preview and a name change to obtain feedback from the previous round of preview, namely JEP 447, Statements before super(...) (Preview), delivered in JDK 22. This feature allows statements that do not reference an instance being created to appear before the this() or super() calls in a constructor; and preserve existing safety and initialization guarantees for constructors. Changes in this JEP include: a treatment of local classes; and a relaxation of the restriction that fields can not be accessed before an explicit constructor invocation to a requirement that fields can not be read before an explicit constructor invocation. Gavin Bierman, consulting member of technical staff at Oracle, has provided an initial specification of this JEP for the Java community to review and provide feedback. The review is expected to conclude on May 27, 2024.

JEP 481, Scoped Values (Third Preview), has been promoted from Candidate to Proposed to Target for JDK 23. Formerly known as Extent-Local Variables (Incubator), this JEP proposes a third preview, with one change, in order to gain additional experience and feedback from one round of incubation and two rounds of preview, namely: JEP 464, Scoped Values (Second Preview), delivered in JDK 22; JEP 446, Scoped Values (Preview), delivered in JDK 21; and JEP 429, Scoped Values (Incubator), delivered in JDK 20. This feature enables sharing of immutable data within and across threads. This is preferred to thread-local variables, especially when using large numbers of virtual threads. The change in this feature is related to the operation parameter of the callWhere() method, defined in the ScopedValue class, is now a functional interface which allows the Java compiler to infer whether a checked exception might be thrown. With this change, the getWhere() method is no longer needed and has been removed. The review is expected to conclude on May 29, 2024

JEP 480, Structured Concurrency (Third Preview), has been promoted from Candidate to Proposed to Target for JDK 23. This JEP proposes a third preview, without change, in order to gain more feedback from the previous two rounds of preview, namely: JEP 462, Structured Concurrency (Second Preview), delivered in JDK 22; and JEP 453, Structured Concurrency (Preview), delivered in JDK 21. This feature simplifies concurrent programming by introducing structured concurrency to "treat groups of related tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability." The review is expected to conclude on May 27, 2024.

JEP 471, Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal, has been promoted from Candidate to Proposed to Target for JDK 23. This JEP proposes to deprecate the memory access methods in the Unsafe class for removal in a future release. These unsupported methods have been superseded by standard APIs, namely; JEP 193, Variable Handles, delivered in JDK 9; and JEP 454, Foreign Function & Memory API, delivered in JDK 22. The review is expected to conclude on May 27, 2024.

JDK 23

Build 24 of the JDK 23 early-access builds was made available this past week featuring updates from Build 23 that include fixes for various issues. Further details on this release may be found in the release notes.

Jakarta EE 11

In his weekly Hashtag Jakarta EE blog, Ivar Grimstad, Jakarta EE developer advocate at the Eclipse Foundation, has provided an update on the upcoming GA release of Jakarta EE 11. Nine (9) specifications, namely - Jakarta Annotations 3.0, Jakarta Authorization 3.0, Jakarta Contexts and Dependency Injection 4.1, Jakarta Expression Language 6.0, Jakarta Interceptors 2.2, Jakarta RESTful Web Services 4.0, Jakarta Persistence 3.2, Jakarta Validation 3.1 and Jakarta WebSocket 2.2 - have been finalized for Jakarta EE 11. The remaining seven (7) updated specifications are in various stages of review.

Spring Framework

It was a busy week over at Spring as the various teams have delivered numerous milestone and point releases on Spring Boot, Spring Framework, Spring Cloud Data Flow, Spring Security, Spring Authorization Server, Spring for GraphQL, Spring Session, Spring Integration, Spring Modulith, Spring Batch, Spring AMQP, Spring for Apache Kafka and Spring for Apache Pulsar. More details may be found in this InfoQ news story.

Kotlin

JetBrains has released version 2.0 of Kotlin that finalizes the new frontend for the Kotlin compiler, codenamed K2, to unify all supported Kotlin platforms by which all compiler backends now share a significant amount of logic and a unified pipeline. Kotlin 2.0 promises faster compilation speed and support for Compose Multiplatform projects. JetBrains has also been developing a K2 Kotlin Mode, currently in alpha, for IntelliJ IDEA. Further details on this release may be found in the what's new page. InfoQ will follow up with a more detailed news story.

Quarkus

Quarkus 3.10.2, the second maintenance release, ships with notable changes such as: a resolution to a QuarkusErrorHandler runtime error upon invoking a REST client endpoint that accepts a @BeanParam on a bean containing a List<T> field annotated with @RestForm; and set the correct configuration key upon generating a native build from Gradle. More details on this release may be found in the changelog.

Open Liberty

IBM has released version 24.0.0.5 of Open Liberty featuring resolutions to the following Common Vulnerabilities and Exposures (CVEs) where a remote attacker can send a specially crafted request causing the server to consume memory resources resulting in a denial-of-service

  • CVE-2024-27268, a vulnerability in WebSphere Application Server Liberty versions 18.0.0.2 through 24.0.0.4
  • CVE-2024-22353, a vulnerability in WebSphere Application Server Liberty versions 17.0.0.3 through 24.0.0.4
  • CVE-2024-25026, a vulnerability in WebSphere Application Server versions 8.5 and 9.0, and IBM WebSphere Application Server Liberty 17.0.0.3 through 24.0.0.4

Notable bug fixes include: a ClassCastException upon using SIP Servlet 1.1 and WebSocket features; the featureUtility connection test to a base URL of a custom repository returns a HTTP 400 response code and fails to recognize it as a working repository. Further details on all of the bug fixes may be found in this list of issues.

Microsoft

After more than a year in development, Microsoft has introduced the general availability of Semantic Kernel for Java, an SDK that meshes Large Language Models (LLMs) with popular programming languages. Version 1.0 delivers: tool calling that enables an AI service to request the invocation of native Java functions; support for both text-to-audio and audio-to-text conversions with their audio service; an enhanced type conversion that allows user to register types and serialize/deserialize them to and from prompts; and the introduction of hooks to monitor key points such as function calls, enabling users to log or intercept them for better tracking and debugging. InfoQ will follow up with a more detailed news story.

Infinispan

Infinispan 15.0.4, the fourth maintenance release, provides notable changes such as: a resolution to a flaky test found in the TracingSecurityTest class; the addition of node names in the tracing spans; and a simplification of the default server configuration files. More details on this release may be found in the release notes and in this InfoQ news story on the release of Infinispan 15.0.0.

JHipster Lite

The release of JHipster Lite 1.9.0 ships with bug fixes, dependency upgrades and new features/enhancements such as: the addition of the Gradle frontend server plugin; removal of the gradleapp property from generate.sh as Gradle is now fully supported; and a simplification of lint-staged configuration. Further details on this release may be found in the release notes.

Langchain4j

Version 0.31.0 of LangChain for Java (LangChain4j) features new integrations: embedding models, Cohere and Jina; web search engines, Google and Tavily; the Jina scoring (re-ranking) model; and the Azure Cosmos DB for NoSQL embedding store. Breaking changes include: a rename of the Judge0 package from dev.langchain4j.code to dev.langchain4j.code.judge0; and a migration of the Anthropic language model from Gson to Jackson. More details on this release may be found in the release notes.

About the Author

Rate this Article

Adoption
Style

BT