Issue
Starting with Studio Pro v11.14.0, Java 25 is the default Java version. When running an application on Java 25, the following warning appears in the console:
A terminally deprecated method in sun.misc.Unsafe
This is caused by some of the Scala dependencies and is harmless, so it can safely be ignored.
Environment
Studio Pro v11.14.0
Cause
Java 21 reaches end-of-life around December 2029. Since Mendix Long-Term Support (LTS) lines extend beyond that, a newer Java Development Kit (JDK) is needed. Java 25 fills that role and also brings runtime performance improvements.
Java 25 is introduced in Studio Pro 11.14.0. Support for LTS versions 10.24 and 11.12 is planned for a later release.
Apps using Java 25 will show a one-time warning at startup. It comes from Scala third-party dependencies that treat Java 25 as terminally deprecated. Because the affected libraries are third-party dependencies, the fix timeline is outside Mendix's direct control.
Only apps created in or after v11.14.0 where Java 25 is explicitly selected. Apps upgraded from an older version default to Java 21 and are not affected.
Solution / Workaround
If the warning is displayed, the following three options are available:
- Continue using Java 21: Select Java 21 via Studio Pro>App Settings>Runtime>Java version
- Suppress the warning: The JVM flag
--sun-misc-unsafe-memory-access=allowcan be applied. It will not work for applications deployed to Mendix Cloud. It can be used for local runs and other deployment methods. - Ignore the warning: No action is required, as no functional impact is introduced.
Internal information related
C4U7H9VC2/p1787224331854999
Additional information
Mendix documentation: Java Version Migration
0 Comments