cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer in Linux

David Annett
Associate III
Posted on February 22, 2018 at 21:09

I have just installed the new STM32CubeProgrammer for Linux but it won't run. I see the error 'Error: Could not find or load main class com.st.app.Main'. Anyone else come across this problem that has a fix?

I went with all the defaults except I changed the install path from '/home/david/STMicroelectronics/STM32Cube/STM32CubeProgrammer' to '/home/david/bin/STMicroelectronics/STM32Cube/STM32CubeProgrammer'.  I did not notice an option for a shared install, or else I would have chosen that.

1 ACCEPTED SOLUTION

Accepted Solutions
David Annett
Associate III
Posted on February 22, 2018 at 22:05

Thanks Bogdan, found the answer there.  For me it was because I am using OpenJDK and the fix was simply:

sudo apt-get install openjfx

View solution in original post

9 REPLIES 9
Posted on February 22, 2018 at 21:53

It seems that this thread deals with the same issue:

https://community.st.com/0D50X00009XkVu4SAF

David Annett
Associate III
Posted on February 22, 2018 at 22:05

Thanks Bogdan, found the answer there.  For me it was because I am using OpenJDK and the fix was simply:

sudo apt-get install openjfx

Posted on February 22, 2018 at 22:16

Frankly I have not used the STM32CubeProgrammer yet. Waiting for more mature releases;)

Posted on February 23, 2018 at 15:32

It's worked pretty well for me except (under Ubuntu) the 'File path' Browse button quit working and editing 'File path' directly has gotten weird.  Works fine in Windows but that's Java for you.

Posted on February 23, 2018 at 15:50

Sill use the ST-LINK Utility + DFU separately.  Not sure what the new tool adds to what we had in the past...

Posted on February 23, 2018 at 23:02

Personally I use ST-Link from Eclipse during development and a range of Linux command line tools in other situations.  I'm looking at it as an easy option for my staff so we have common software regardless of OS.  It should be easier than trying to help people using the old Windows program when I can't actually run that myself.

matheusmbar
Associate II

I've just removed Oracle Java from my workstation and cannot run STM32Cube Programmer with Openjdk

I get this return when running through terminal:

~/opt/STM32CubeProgrammer/bin$ ./STM32CubeProgrammer
/home/user/opt/STM32CubeProgrammer/bin/STM32CubeProgrammerLauncher
/home/user/opt/STM32CubeProgrammer/bin
JavaFX NOT installed => warn user

And a pop up screen saying that i must install openjfx

I've already installed openjfx and it didn't fix the situation.

~/opt/STM32CubeProgrammer/bin$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.10.3)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.10.3, mixed mode, sharing)
~/opt/STM32CubeProgrammer/bin$ javac -version
javac 11.0.2

Same problem on Ubuntu 18.04.

'openjfx' is installed, and I tried with 'default-jre', 'openjdk-8-jre' and 'openjdk-11-jre' - all fail similarly.

Works fine on Ubuntu 16.04, with openjdk-8-jre.

STMCubeProgrammer 2.1.0

AAbud.919
Associate

We should install old packages for openjfx for Java 8 not only one openjfx:

sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx-source=8u161-b12-1ubuntu2

And protect it for update

sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx openjfx-source

Full guide in Russian

https://blog.radiotech.kz/programmy/stm32cubeprogrammer-ne-zapuskaetsya-v-linux/