JDK update in MPS 2022.2
MPS 2022.2 came with a major change in the Java Development Kit version. It now supports JDK 17, while the previous versions supported and ran on JDK 11. This change may or may not impact your projects, so we decided to cover the areas that could be affected.
The platform update
The JDK change originated in the underlying IntelliJ platform that MPS builds on. The IntelliJ IDEA team listed the benefits of this change in one of their recent blog posts.
In short, JetBrains Runtime 17 (JBR 17) brings significant IDE performance improvements, better security, enhanced rendering performance on macOS thanks to the Metal API, and more.
The project bytecode version
Projects in MPS can define their “Project bytecode version”:
Unless a specific version is selected in your project, the “JDK Default” value now is JDK 17 instead of JDK 11. The project JDK will be changed as soon as you open the project in MPS 2022.2. This change is not likely to affect your project, however.
IDEA plugins with MPS
When building plugins for MPS or IntelliJ IDEA, make sure the Project bytecode version is set to version 17 or earlier, as IDEA will not run plugins compiled with newer versions of the JDK.
Using MPS plugins in IDEA
IntelliJ IDEA projects that use MPS plugins must have the Project JDK in IntelliJ IDEA set to version 11 or newer.
Standalone IDE applications
Standalone applications based on MPS have to be run on JDK 17. You might be able to run them on JDK 11, but this option is not supported.
MPS itself is compiled using JDK 11. This may be an important piece of information for projects that embed pieces of MPS code. In these cases it is important to know that certain MPS runtime solutions do not need to be re-compiled.
Solve issues with Java reflection
There may be some problems with the visibility of different classes that your code accesses using Java reflection API. You can solve the issues in the same way we did for the JDK classes when running MPS – use the –add-opens JVM argument to add the respective packages. Check out the user guide for more details:
If you encounter any problems, please report them to our issue tracker.
The JetBrains MPS team
Subscribe to Blog updates
Thanks, we've got you!
MPS 2021.3.5 Is Out Now
MPS 2021.3.5 has been released with a small batch of useful fixes and an improvement backported from our newest MPS 2023.2 build. Visualize the current values for cells that violate constraints When an invalid value is inserted into a cell, the inserted invalid value is marked in red. Meanwhile, the…
MPS 2022.3.1 Has Been Released
For MPS users that are using last year’s version (2022.3), we’re releasing an update with numerous fixes. Many of them have been back-ported from the new MPS 2023.2, so you may have heard of some of them already. DOWNLOAD MPS 2022.3.1 See a full list of issues fixed in 2022.3.1 here. Back-ported fro…
MPS 2023.2 is now available
In this release, we’ve achieved objectives from several different areas. You will find substantial improvements to JUnit support and the BaseLanguage integration with Java’s lambdas. The IDE is now more configurable, with the type system offering new ways to override rules in extending languages, as…
MPS 2021.3.4 Released
MPS 2021.3.4 has just arrived with a batch of useful backported improvements. Parallel model checker The model checker can now effectively utilize parallel hardware, thereby speeding up the process of model checking. Depending on the settings in Settings | Tools | Model Checker, it can spawn multipl…