2020-10-13 02:32 AM
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
2020-10-13 01:07 PM
****** on OpenSuse: Thanks! It works! However the workaround for the exception does not, so I have to ignore it.
2020-10-14 12:29 AM
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) ?
2020-10-18 08:27 PM
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
2020-10-25 07:32 PM
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?
2020-10-26 05:30 AM
You can get it here:
https://www.azul.com/downloads/zulu-community/?package=jdk-fx
2020-10-26 04:34 PM
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.
2020-10-26 05:11 PM
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.
2020-11-25 02:46 AM
hello All,
STM32CubeProgrammer is now embedding its own JRE, no more need to these workarounds
Have fun using STM32Cube ecosystem
2020-11-30 11:39 AM