Issue
When attempting to create a deployment package using the MxBuild tool, users get an error resembling the following:
ERROR: An error occurred while compiling Java actions
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compile'.
> error: release version 21 not supported
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 7sEnvironment
Studio Pro (all versions)
Cause
The issue is caused by a mismatch between the Java version specified in the App Settings and the Java Development Kit (JDK) specified in the MxBuild command. For example, the error will occur if Java 11 is specified in the application settings and Java 21 is specified in the MxBuild command:
mxbuild --java-home="C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot" --java-exe-path="C:\Program Files\Eclipse Adoptium\jdk-21.0.2.13-hotspot\bin\java.exe" "C:\application.mpr"Solution / Workaround
To resolve the problem, ensure that the Java version specified in the application settings and the Java version specified in the MxBuild command are the same. For example, if Java 11 is specified in the application settings, ensure that Java 11 is specified in the MxBuild command:
mxbuild --java-home="C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot" --java-exe-path="C:\Program Files\Eclipse Adoptium\jdk-11.0.20.101-hotspot\bin\java.exe" "C:\application.mpr"Internal information related
- 222324
Additional information
- Mendix documentation:
- Other documentation:
0 Comments