Reduce your TCO of building and using Spring Native applications with just 3 steps. Switch to the best Unified Java Runtime. Learn More.

Liberica JDK 17 release

Liberica JDK 17 LTS release 一 solid ground for an update


Published September 17, 2021


LTS means “Long-Term Support” release, but we sometimes call it “Long Time no See.” And while the LTS releases of Liberica JDK are introduced at a cadence fully aligned with OpenJDK releases, it’s a big event every time, which we await eagerly, so much so, that we have already told you about all the added, updated, and deprecated features in the new Java™.

Every time there is a new LTS release, the question arises, “To upgrade or not to upgrade?” And while there are no radical differences between non-LTS and LTS releases, users tend to stick to the later ones, with 69% of them still using Java 8, 36% relying on Java 11, and only 16% enjoying the features of Java 12 and up (with some of the developers asked using more than one version).1 The new LTS release could be solid ground for an update, for many reasons, like the new features and security.

In this article, we would like to focus on the essential changes, and try to give you some guidelines for updating in case you do make that decision.

So, without further ado, we present to you Liberica JDK 17. And if you have any questions, don’t hesitate to ask the people who created it!

Why choose Liberica as the LTS JDK?

What makes Liberica JDK different from other OpenJDK builds, and from our competitors? Many things:

  • Liberica JDK is released by the same people who develop OpenJDK. BellSoft is one of the top OpenJDK contributors, with multiple JEPs proposed and implemented. In OpenJDK 17 we fixed 7 issues out of 2743.
  • In addition to the numbered versions, we release Critical Patch-only Updates (CPU) that keep your runtime secure.
  • Liberica JDK has additional features not present in OpenJDK.
  • We support many additional platforms, including AArch64, lightweight Alpine Linux, and many others.
  • Our enterprise support is provided by the same engineers who have developed Liberica JDK, and it is available 24/7/365. No middle-men, no long wait times.
  • We provide support to VMware Tanzu users and developers. Spring Framework 6 and Spring Boot 3-based applications will require a minimum of JDK 17 at runtime. It will be the JDK version used in Spring Framework

You can get Liberica JDK 17 and enjoy all the benefits right now!

We have already covered all the JEPs in depth, so let’s talk about the most important new features.

Liberica JDK 17 is more secure

There are many vital additions that give JDK security a significant boost.

  • With the strong encapsulation for JDK internal elements (JEP 403), developers avoid running into a situation when they rely on undefined behavior not specified in the public API. It lessens the risk of using potentially insecure undocumented APIs without understanding their inner workings. It also aids in safer development. In our opinion, this is one of the major updates that will influence Java™ development for many years.
  • The introduction of context-specific deserialization filters (JEP 415) is the key to fixing a potential weak spot for hacker attacks.
  • The deprecation of the outdated Security Manager (JEP 411) will encourage developers to move to modern security solutions.

Liberica JDK 17 is more convenient

It is now easier to write in Java™, so you may get a speed development productivity boost!

  • The pattern matching for switch (JEP 406) and enhanced Vector API (JEP 414) will help make code clearer, more concise, and easier to write and modify. Using the Vector API can lead to faster calculations, and pattern matching for switch will facilitate and speed up code writing.
  • With the foreign function and memory API (JEP 412) the usage of external native (non-Java) libraries is more convenient. JNI will no longer be necessary for that.
  • Sealed classes and interfaces (JEP 409) will give developers more control over the code responsible for implementing the classes they write.
  • With always-strict floating point semantics (JEP 306), the original floating-point semantics of the language and VM (changed in Java SE 1.2) are restored, providing more regularity in a tricky aspect of the platform without causing a hit to performance.

Liberica JDK 17 is modern

The new JDK version adds the features that are expected in contemporary programming languages.

  • The MacOS/AArch64 port (JEP 391) and a new rendering pipeline for macOS (JEP 382) are the answers to Apple’s decision of transitioning to different architecture, and using the Apple Metal API instead of OpenGL. It means that Java 17 is ready for the newest Macs.
  • The enhanced pseudo-random number generators (JEP 356) is the addition that enhances the RNG API. A new interface, RandomGenerator, supplies a uniform API that allows you to utilize any RNG algorithm, including three that are already implemented.
  • Deprecating the Applet API for removal (JEP 398) is another step to a modern development environment without using the outdated functions.

Liberica JDK has sweet spots

Liberica JDK is the instance of OpenJDK with a wide selection of supported platforms, including specific ones, allowing the build of the smallest containers. We include the LibericaFX (JavaFX instance) and offer the edition embedded. We provide many tools, including the Liberica Native Image Kit for native images, and there are more tools in development. Liberica has been used to power up Spring Framework and Spring Native since 2021.

We provide free security patches 4 times a year, in addition to numbered releases. Our commercial support helps you with minimal response time, and without a middle-man.

To upgrade or not to upgrade

We are now back to the question of upgrading (or not). Is it worth it?

In our opinion 一 yes, it is, and here’s why:

  • In case you have been using the newer JDK versions (11 and up), it is hard to find a reason to miss the upgrade. You have likely rewritten your older apps already, and moving from JDK 15 to JDK 17, for example, will require little to no rework.
  • If you are still on JDK 8, you are using the dated version that was released in 2014. Although in the case of Liberica JDK you will still receive the free security updates untill 2031 (or paid updates in case of some other vendors), you are still missing out on seven years of new features. This new LTS build is a great opportunity to move up, after now it will only get harder to rewrite your app’s code for the newer versions of JDK. When there is no choice but to upgrade, you will have much more work to do.
  • If you use JDK 7 or lower, the time to upgrade is long past due. While Liberica JDK provides support to versions 6 and 7 until 2026, there are still many security issues that make running the apps safe only in a closed environment. For example, JDK 7 uses LTS 1.0 by default, making it very vulnerable to a lot of network attacks. We strongly recommend that you invest in upgrading your apps and your runtimes. Our engineers will advise you about upgrading the runtime and dealing with any issues that arise.
  • If you run your apps in a closed environment, plan never to make any changes, and low peak performance, critical performance (latency), effective resource utilization in container environments and slow startup time and speed are not an issue, you may think that you are off the hook forever. However, there are still ways you may be harmed with maliciously crafted data for these apps. Upgrading is important for that reason alone.

While upgrading is a process, in our opinion it is the right decision. While you are still getting ready to move to JDK 17, we recommend using the runtime with the support you can rely on.

Let’s discuss all of the issues with updating and the solutions to them.

How upgrading works

Java™ language has good backward compatibility. And if you use Docker or Kubernetes, then “upgrading” can be as simple as specifying the newer version in Docker image. Here is an example tutorial to give you an idea of how to select a suitable runtime in Docker.

The main issue is whether your application has dependencies on APIs or functions that have been removed from modern versions of JDK or strongly encapsulated. Remember, these changes were made for a reason! The deprecated components are replaced when new, faster, and safer solutions are available to perform the same tasks.

Note that the old functionality is never removed at once. The first step is always marking for deprecation. So if you update frequently, you’ll have plenty of time to get ready for such changes.

The first step is making sure your apps will run. Resources like the Java version Almanach2 can help you with finding the removed functionality in your apps.

The next step is updating your tools. For example, if you produce native images, check out the new Spring Native3, powered-up by Liberica Native Image Kit. Make sure your Gradle and Maven plugins are up-to-date. If your apps utilize JavaFX, get the full Liberica JDK package containing LibericaFX, as OpenJDK has not included JavaFX since Version 11. The same goes for Mission Control, which was removed from OpenJDK and is available from BellSoft.

Another thing to be aware of is JEP 403, which encapsulates JDK internal APIs. You should upgrade all the dependencies involved and remove the outdated code, if possible. As a temporary measure, you can enable your application to access internals like

--add-opens=jdk.sctp/com.sun.nio.sctp=ALL-UNNAMED

Or

--add-opens=jdk.httpserver/com.sun.net.httpserver=ALL-UNNAMED

In the future, when the JEP 408 is implemented in the OpenJDK, there will be a better public alternative for the latter case.

If you feel overwhelmed, remember that it will become more challenging with every new release. In many cases updating is a matter of days or even hours. If you need help, our experts are here to make the process as easy and flawless as possible.

Liberica JDK 17 is here

Now that we have discussed all the issues around updating, we are sure that the advantages for your business (for example, TCO reduction) outweigh the negatives by a lot. Our advice stands 一 get the new Liberica JDK, and enjoy all of the benefits for your developers, security team, and in your productivity!

  1. https://www.jrebel.com/blog/2021-java-technology-report
  2. https://javaalmanac.io/
  3. https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/
Author image

Aleksei Voitylov

BellSoft CTO

 LinkedIn