Skip to main content
Nawres GHARBI
Technical Moderator
October 13, 2020
Question

STM32CubeProgrammer ZULU8 Jre recommended

  • October 13, 2020
  • 4 replies
  • 4649 views

STM32CubeProgrammer 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

For STM32CubeProgrammer tool, STMicroelectronics recommend to use the Zulu 8 JRE and this how you can install it

Note:

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

Instructions to install and launch STM32CubeProgrammer (V2.5.0) with ZULU 8

To avoid issues linked to java (javafx missing library), some workarounds are available using the ZULU 8 which is basically an openjdk with and integrated javafx

Windows(32/64 bits):

1) Download Zulu Jre 8 from (https://cdn.azul.com/zulu/bin/zulu8.44.0.13-ca-fx-jre8.0.242-win_x64.zip)

2)Unzip the package in your machine

3) Change the Zulu\bin\java.exe settings to fit the high resolution screens settings:

-Right click on Zulu\bin\java .exe

    -Select properties, then the compatibility tab --> Settings and tick override high DPI scaling behavior [System]

                         

4)Install STM32CubeProgrammer with ZULU JRE8:

      -Run CMD with administrator privilege.

      -Install STM32CubeProgrammer "Zulu"\bin\java.exe -jar SetupSTM32CubeProgrammer-2.5.0.exe

5) After installation, you can launch the tool now through CMD

       -Open CMD window(no admin rights are needed)

       - Go to STM32CubeProgrammer install location: "....\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin"

        -Launch with this command: "Zulu_install_location\bin\java.exe -jar STM32CubeProgrammer.exe"

Linux(64 bits):

1) Download Zulu jre 8 from (https://cdn.azul.com/zulu/bin/zulu8.44.0.13-ca-fx-jre8.0.242-linux_x64.tar.gz)

2) Unzip the package in your machine.

3)Install STM32CubeProgrammer with Zulu jre 8:

         -open a new terminal and run the following:

"home/usr/Desktop/zulu8.44.0.13-ca-fx-jre8.0.242-linux_x64/bin/java -jar STM32CubeProgrammer-2.5.0.exe"

4) Go to STMCubeProgrammer install path /bin

5) Run "Vi STM32CubeProgrammer" and modify the java keyword by the path of the unzipped zulu package .

example(.../zulu8.44.0.13-ca-fx-jre8.0.242-linux_x64/bin/java -jar $DIR/STMCubeProgrammerLauncher)

6) Run command ":./STM32CubeProgrammer"

Macos:

1) Download the zulu jre 8 from(https://cdn.azul.com/zulu/bin/zulu8.44.0.13-ca-fx-jre8.0.242-macosx_x64.zip)

2) Unzip the package in your machine.

        

3) Install STM32CubeProgrammer with Zulu jre 8:

         -Open terminal :chmod +x /Users/usr/Downloads/zulu8.44.0.13-ca-fx-jre8.0.242-macosx_x64/bin/java

         -Run Terminal (if it does not work run it in admin mode (with sudo -i))

         

.../zulu8.44.0.13-ca-fx-jre8.0.242-macosx_x64/bin/java -jar .../STM32CubeProgrammer-2.5.0.exe

4) Run STMCubeProgrammer

       -Go to STM32CubeProgrammer install location

 "cd Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/Macos/bin"

-.../zulu8.44.0.13-ca-fx-jre8.0.242-macosx_x64/bin/java -jar ./STM32CubeProgrammer

Note:In some cases on console could be displayed this exception related to openjdk distribution (like liberica and zulu):

java.lang.ClassNotFoundException: com.sun.deploy.uitoolkit.impl.fx.HostServicesFactory :

this exception could be safely ignored and it doesn’t affect the STM32CubeProgrammer

To avoid this exception you can replace java.exe by javaw.exe while launching the GUI

This topic has been closed for replies.

4 replies

Uwe Bonnes
Chief
October 13, 2020

****** on OpenSuse: Thanks! It works! However the workaround for the exception does not, so I have to ignore it.

Mhuds.1
Visitor II
October 14, 2020

Thanks, I've spend hours and hours trying to get CubeProgrammer to open. It does open with this solution but how can I get it to open normal with the app icon? i.e. without using terminal (Mac) ?

_dalbert
Associate II
October 19, 2020

Thanks, this got it working for me on Windows 10 using Azul zulu JDK.

NOTE: you MUST use the JavaFX version

Once it's installed, you don't have to launch the application from the command line; you can just modify the Desktop shortcut; for example I modified the target (right-click shortcut->Properties->Target):

"C:\Program Files\Zulu\zulu-8-fx\bin\javaw.exe" -jar STM32CubeProgrammer.exe

Kzk.1
Visitor II
October 26, 2020

Hi.When I launch STM32CubeProgrammer.exe.

Error:CubeProgrammer_API or one of its dependencies is missing. Please try reinstalling the program of check your java architecture

How can I get JavaFX version?

_dalbert
Associate II
October 26, 2020
Nawres GHARBI
Technical Moderator
November 25, 2020

hello All,

STM32CubeProgrammer is now embedding its own JRE, no more need to these workarounds

Have fun using STM32Cube ecosystem