cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer ZULU8 Jre recommended

Nawres GHARBI
ST Employee

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

9 REPLIES 9
Uwe Bonnes
Principal III

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

Mhuds.1
Associate

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 III

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

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?

Thanks for your reply.

I get it from https://cdn.azul.com/zulu/bin/zulu8.50.0.21-ca-fx-jdk8.0.272-win_x64.zip

Unfortunately,it still can't work with same error.​

I'll wait for the STM32CubeProgrammer 2.6.0 installer.

I'm sorry to hear it's not working for you. It is working for me. I followed the instructions in the main post above about setting DPI Scaling behavior to System. If you want to share how you are launching it and what error you are getting, I'd be happy to help. Here's my setup (which works):

c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Zulu\zulu-8\bin\; ...
 
c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>java -version
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (Zulu 8.50.0.21-CA-win64) (build 1.8.0_272-b17)
OpenJDK 64-Bit Server VM (Zulu 8.50.0.21-CA-win64) (build 25.272-b17, mixed mode)
 
c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>java -jar STM32CubeProgrammer.exe
jar:file:/C:/Program%20Files/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32CubeProgrammer.exe!/fxml/Config.fxml

If you have multiple Javas installed, make sure the java you want (the Zulu JDK-8 with Java FX) is the first one in your search path. If you want to make sure it's the fx version, you should see the file openjfx-src.zip in the folder C:\Program Files\Zulu\zulu-8 and some javafx jar files in the lib folder.

Nawres GHARBI
ST Employee

hello All,

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

Have fun using STM32Cube ecosystem