ARTICLE

Liferay Ends Support for Java 8 and Java 11

Starting in Q1 2025, Liferay is ending support for Java 8 and 11 and recommends switching to Java 21. Users of Liferay 7.4 are advised to take this step with their next migration.

Liferay has officially announced that it is ending support for Java versions 8 and 11. Starting with the release planned for the first quarter of 2025, Liferay will be compatible exclusively with Java 21. This decision underlines the goal of keeping the platform state of the art and benefiting from the improvements in performance, security and functionality that newer Java versions offer.

Why Java 21?

Java 21, the current Long-Term Support (LTS) version, brings a wide range of new features and optimizations that make it the ideal runtime environment for modern applications. Here are some key innovations:

1. Scoped Values (JEP 429)

Scoped Values enable more efficient and secure data management in multithreaded environments. They offer a modern alternative to ThreadLocal variables and improve performance in parallel processes.

2. Sequenced Collections (JEP 431)

A new API for Sequenced Collections has been introduced that enables ordered and intuitive handling of data structures such as lists and sets. This simplifies working with ordered data and reduces the amount of code required.

3. Virtual Threads (JEP 444)

With Virtual Threads, developers can efficiently manage thousands of threads without placing an excessive load on a system's resources. This significantly improves the scalability and performance of applications.

4. String Templates (JEP 430)

String Templates make it easier to work with dynamic strings and provide a safer and more readable alternative to classic string concatenation or formatting.

5. Pattern Matching for Switch (JEP 441)

Pattern matching has been extended to switch statements, making code clearer and less error-prone. This is especially helpful in complex logic.

What does this mean for Liferay users?

For companies and developers, the end of support for Java 8 and 11 means that existing Liferay installations based on these versions must be updated. Liferay provides comprehensive resources and guides to make the migration process easier.

Switching to Java 21 early offers numerous advantages:

• Higher performance: Applications benefit from optimized resources and shorter run times.

• Improved security: The latest security features protect against potential threats.

• Future-proofing: With Java 21 as your foundation, you are well positioned for upcoming developments.

Conclusion

Starting with version Q1 2025, Java 21 is the new standard for Liferay. Companies should plan and implement the migration in good time to be able to use future Liferay versions smoothly. The new features of Java 21 make the switch not only necessary but also worthwhile. Benefit from better performance, more modern functionality and a stable foundation for your applications.

Marc Hermann
Questions about this topic?
Marc Hermann, working with Liferay and Magnolia since 2008, replies personally.
Get in touch →