Martin Ahrer

Thinking outside the box

0001-01-01 1 min read

The following describes selected improvements of the Java JVM. See the Java 12 release notes.

With JEP-341, now CDS archives are built during the JDK build. CDS is already on by default as of {java11}.

0001-01-01 1 min read

The following describes selected improvements of the Java API. See the Java 20 release notes.

Java 20 is introducing the following API enhancements as developer preview or Incubator.

  • JEP 429 is introducing scoped values, which enable the sharing of immutable data within and across threads. They are preferred to thread-local variables, especially when using large numbers of virtual threads

  • JEP 436 is introducing virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications.

  • JEP 437 is simplifying multithreaded programming by introducing an API for structured concurrency. Structured concurrency treats multiple tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability..

Continue reading

0001-01-01 1 min read

Before Java 24, working with Java class files required third-party libraries like ASM or BCEL. The new Class-File API provides a standard way to parse, generate, and transform Java class files.

Parse Class File
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twentyfour/api/ClassFileApi.java[tag=parseClassFile]
Generate Class File
Continue reading

0001-01-01 2 min read

The following describes selected improvements of the Java API. See the Java 24 release notes.

Java 24 is introducing the following finalized API enhancements.

  • JEP 484 is finalizing the Class-File API. Provide a standard API for parsing, generating, and transforming Java class files. This API will replace the need for third-party libraries like ASM.

  • JEP 485 is finalizing Stream Gatherers. Enhance the Stream API to support custom intermediate operations. This will allow stream pipelines to transform data in ways that are not easily achievable with the existing built-in intermediate operations.

  • JEP 496 is introducing Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism. Provide implementations of KEM based on the Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM) standard specified in FIPS 203.

  • JEP 497 is introducing Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm. Provide implementations of the Module-Lattice-Based Digital Signature Algorithm (ML-DSA) standard specified in FIPS 204.

Continue reading

0001-01-01 1 min read

Before Java 24, creating sliding windows required complex collectors or external loops.

Sliding Window Before Java24
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twentyfour/api/StreamGatherers.java[tag=slidingWindowBeforeJava24]
Sliding Window With Java24
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twentyfour/api/StreamGatherers.java[tag=slidingWindowWithJava24]

Java 24 Stream Gatherers provide built-in sliding window operations as intermediate operations.

Continue reading

0001-01-01 1 min read

The following describes selected improvements of the Java Virtual Machine. See the Java 24 release notes.

Java 24 is introducing the following finalized JVM enhancements.

  • JEP 475 is introducing Late Barrier Expansion for G1. Improve G1 garbage collector performance by moving the expansion of GC barriers from the platform-independent optimization phase to the platform-dependent code generation phase.

  • JEP 490 is ZGC: Remove the Non-Generational Mode. Remove ZGC’s non-generational mode, retaining only the generational mode, which offers better application performance.

  • JEP 491 is introducing Synchronize Virtual Threads without Pinning. Enable virtual threads to synchronize without pinning the underlying platform thread by reimplementing object monitors to use a new locking scheme.

Continue reading
Older posts Newer posts