Monday, 30 June 2025

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called

You tried to run an executable JAR file and this happened!

Here's an interesting blog post on sun.misc.Unsafe from Java Magazine.  An example application may be using a Hardware CPU feature unsupported by the current Java version.

Alternatives include the VarHandle API (packaged in java.lang.invoke) as described in this blog post.

JDK 24 - What's up? Almost 150K Unicode characters now supported!

Here are the docs for JDK24.

Note that since Java 11, Oracle stopped offering the JRE as a standalone installer. Instead, the JDK bundles everything: the compiler, tools, and the runtime needed to run Java apps. 

The way to the JVM is thus through the JDK.

So if you are Windows-playing, prepare for an MSI the size of a 200MB rocket ship.

OK, here's the big seller if you don't know whether to upgrade. Unicode 16 is now supported!! Unicode 16, which was released in September 2024, has now been integrated as per JDK-8319993. Woo hoo!!

java.lang.Character which supports the Unicode character database adds 5,185 characters, which brings the total to almost 150,000 supported characters. New scripts supported includes Garay from West Africa.

Checking your install of JDK24 you will likely see something like this:

java --version

java 24.0.1 2025-04-15

Java(TM) SE Runtime Environment (build 24.0.1+9-30)

Java HotSpot(TM) 64-Bit Server VM (build 24.0.1+9-30, mixed mode, sharing)

Wednesday, 29 January 2025

JDK 23 is the latest release of the Java Platform

JDK 23 reached GA on September 2024 and its scope is covered in JSR398. The expert group included experts from Red Hat, Azul, SAP. Oracle and the Eclipse Foundation. The Windows version is only available in 64 bit.

JDK23 introduces the Third Preview for Structured Concurrency whose idea is to simplify concurrent programming incorporating ideas from Erlang (such as hierarchical supervisors).

Groups of related tasks in different threads are treated as a single unit of work, streamlining error handling and cancellation. 

The term Structured Concurrency was coined by Martin Sustrik and popularized by Nathaniel J Smith.