Skip to main content
David Annett
Associate III
February 22, 2018
Solved

STM32CubeProgrammer in Linux

  • February 22, 2018
  • 9 replies
  • 2973 views
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.

    This topic has been closed for replies.
    Best answer by David Annett
    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

    9 replies

    Bogdan Golab
    Lead
    February 22, 2018
    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
    David AnnettAuthorBest answer
    Associate III
    February 22, 2018
    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

    Bogdan Golab
    Lead
    February 22, 2018
    Posted on February 22, 2018 at 22:16

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

    David Littell
    Senior II
    February 23, 2018
    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.

    matheusmbar
    Associate
    April 23, 2019

    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

    kraiskil
    Associate III
    June 12, 2019

    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
    Visitor II
    November 7, 2019

    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/