cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX which JRE to use ?

Nawres GHARBI
ST Employee

STM32CubeMX requires a Java™ Runtime Environment (JRE) to execute and In April 2019, Oracle decided to change their economic model around Java.

Since this date the Oracle JVM beyond version 1.8u211 becomes non-free for professional usage

STMicroelectronics promotes the use of the following JREs:

• Oracle®(a) JRE, subject to license fee.

• Amazon Corretto™(b) (c) JRE, no-cost solution based on OpenJDK, JDK installer recommended.

The JRE version constraints are:

• 64-bit version mandatory; 32-bit version not supported

• The STM32PackCreator companion tool requires JRE supporting JavaFX™

• Minimum JRE version is 1.8_45 (known limitation with 1.8_251)

• Version 11 is supported

• Versions 7, 9, 10, 12 and upper are not supported

STM32CubeMX operation is not guaranteed with other JREs.

What's Next?

Development team is working on bundling the JRE with CubeMX installer", there will be no more need to install a JRE to use STM32CubeMX

2 REPLIES 2
RScot.2
Associate II

Consider JRE from here:

https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot

Installer has option to add Registry keys which help CubeMX find this JRE. Need to check the option box for this as it's off by default.

Did quick test of installing and running CubeMX 6.1.0 to generate a H7 project IOC + src.

Appeared to work correctly.

DD.3
Associate

Hello Nawres,

I am using STM32CubeMX 6.1.1, STM32PackCreator, openjdk & openjfx.

The STM32PackCreator manual said JavaFX Version 11 is supported, but I got the error on Version 11. The following is the error message:

$ java -jar STM32PackCreator.exe

2021-01-06 16:54:17,357 [INFO] Main:137 - Starting Pack Creator

2021-01-06 16:54:17,389 [INFO] Main:128 - Detected JVM Path = /usr/lib/jvm/java-11-openjdk-amd64/bin/

2021-01-06 16:54:17,397 [INFO] Main:60 - Detected Java Version = 11.0.9.1

2021-01-06 16:54:17,429 [ERROR] Main:115 - Error while searching JavaFx: com.sun.javafx.runtime.VersionInfo

2021-01-06 16:54:17,433 [ERROR] Main:144 - JavaFX not found or invalid version.

How can I solve this issue?

I tested with jre version 8 and it works fine.

But, later on, oracle policy is changed, so I wnat to work with openjfx and openjdk.

- DD