Strong Java LTS arrives with the release of 25

But efforts to simplify popular programming language for beginners are unlikely to boost popularity

Oracle has released JDK (Java Development Kit) 25, the first long term support (LTS) version since JDK 21 two years ago. New features include beginner-friendly compact source files, succinct module imports, and more flexible constructors.

Simplified code in Java 25

Simplified code in Java – click to enlarge

An LTS release is impactful since many organizations choose not to use releases with a short support life. If one extends the "what's new" list to include JDK 22, 23, and 24, there are many significant updates, including the full release of the Foreign Function and Memory (FFM) API which will gradually replace JNI (Java Native Invocation) for interop with native libraries. The FFM API replaces "the brittle machinery of native methods and the JNI with a concise, readable, and pure-Java API," according to the official enhancement proposal which came out of preview in JDK 22.

java

Java 25 puts 32-bit x86 out to pasture, adds 17 shiny new features

READ MORE

The full set of new features in JDK 25 is in Oracle's post and a release build of the OpenJDK version under the GPL (General Public License) is now available.

Java is well embedded in enterprise IT and is among the most popular programming languages; the analysts at Redmonk place it at number three after JavaScript and Python, ahead of PHP, C# and TypeScript. Newcomers to coding, however, are more likely to pick up Python or JavaScript, and AI coding tools tend to default to JavaScript or TypeScript if not told otherwise, which is perhaps a long-term threat to Java usage.

The Java compiler group, as part of Project Amber which aims to add productivity features to the language, wanted to make the platform more approachable for beginners and came up with what is now called "Simple source files and instance main methods" in JEP (Java Enhancement Proposal) 495, delivered in JDK 25. The beginner's first Java program has until now required a class declaration including a method declared as public static void main(String[] args). "There is too much clutter here – too much code, too many concepts, and too many constructs" states the proposal. Using simple source files one can now write as little as:

void main() {
IO.println("Hello World!");
}

And the code will compile and run. Along with succinct module imports, which imports multiple packages with a single import statement based on other modules that the imported module uses, Java coders can now get started more easily and experienced devs can write more concise code.

It is doubtful that this will do much to increase Java's popularity among new coders. The new approach hides key Java concepts but does not remove them; they will have to be learned later. This includes object orientation, accepted as the modern way to code when Java was invented 30 years ago, but now in question; Rust, for example, implements some object-oriented features but not inheritance, at least not in the same way.

Reflecting on the release, developers praised Java as "an incredibly stable and mature ecosystem," for example, and "near ubiquitous." On the negative side, "old Java programs continue to be needlessly verbose," some argue, while others like the JVM (Java Virtual Machine) prefer to code in other languages that run on it, such as Clojure which is a functional programming language, or JetBrains Kotlin which has been adopted by Google as the primary language for Android development (previously Java).

Oracle's stewardship of Java has proved effective though also expensive for those organizations unable to avoid the company's commercial builds.

All that said, Java continues to mature, and continues to power huge amounts of enterprise applications, with Java 25 the latest in a long line of incremental improvements. ®

More about

TIP US OFF

Send us news


Other stories you might like