Skip to main content
James Wilson
Associate
November 20, 2018
Solved

ubuntu install of STM32CubeProgrammer not working

  • November 20, 2018
  • 4 replies
  • 1795 views

Hi

I am trying to install STM32CubeProgrammer on Ubuntu 18.04.1 LTS.

It apparently installs OK and places an icon on the desktop. When I start the app., a dialog with

"You are using OpenJDK, please Install OpenJFX

Debian: sudo apt-get install openjfx

or install Oracle JRE"

I have tried running "sudo apt-get install openjfx" but the problem still persists.

java is apparently installed

java --version

openjdk 10.0.2 2018-07-17

OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3)

OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)

could some one please help?

thanks

James

    This topic has been closed for replies.
    Best answer by After Forever

    Ubuntu's OpenJFX is tied with OpenJDK 8.

    You have two options:

    1. If STM32CubeProgrammer supports OpenJDK 8, set your default Java as OpenJDK 8 using "sudo update-alternatives --config java"
    2. If STM32CubeProgrammer does not support OpenJDK 8 then you can try to use official OpenJDK/OpenJFX distributions instead of the ones in Ubuntu's repository (this is not a nice solution though)

    4 replies

    After Forever
    After ForeverBest answer
    Senior III
    November 20, 2018

    Ubuntu's OpenJFX is tied with OpenJDK 8.

    You have two options:

    1. If STM32CubeProgrammer supports OpenJDK 8, set your default Java as OpenJDK 8 using "sudo update-alternatives --config java"
    2. If STM32CubeProgrammer does not support OpenJDK 8 then you can try to use official OpenJDK/OpenJFX distributions instead of the ones in Ubuntu's repository (this is not a nice solution though)
    James Wilson
    Associate
    November 20, 2018

    thanks "After Forever", I tried option 1 and selected the option to set to "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" which allowed the app to start.

    cheers

    James

    beantowel
    Visitor II
    May 23, 2019

    Adopting your option, i get this message(with openjfx installed):

    $ ./STM32CubeProgrammerLauncher

    ./STM32CubeProgrammerLauncher

    /home/beantowel/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin

    JavaFX NOT installed => warn user

    Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper

    at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)

    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)

    at java.awt.Window.getToolkit(Window.java:1358)

    at java.awt.Window.init(Window.java:506)

    at java.awt.Window.<init>(Window.java:537)

    at java.awt.Frame.<init>(Frame.java:420)

    at javax.swing.JFrame.<init>(JFrame.java:233)

    JQuan
    Associate
    September 3, 2019

    @beantowel FWIW I was able to work around this problem on Debian by using Oracle's official JRE. https://www.java.com/en/download/linux_manual.jsp + https://github.com/chrishantha/install-java

    debugging
    Lead
    September 16, 2019

    My JAVA_HOME default to OpenJDK for coding Android applications to avoid all the legal stuff Oracle is throwing upon the community making everyone (including corporate management) scared of licens fees they "might" have to pay when one does not understand or TL;DR all the "small letters" . Since java fee may apply to embedded systems, it might be good if STM would switch to support OpenJDK (or another way to elminate this anxiety). I installed OpenJFX but that did not help. (Applies to Orcale's java it seems))

    In my case no JAVA_HOME was set in any of my profile, nor the path to it. IThe reason was that something had sets some symbolic links :

    command -v java

    /usr/bin/java

    ls -l /usr/bin/java

    lrwxrwxrwx 1 root root 22 Jan 6 2018 /usr/bin/java -> /etc/alternatives/java

    ls -l /etc/alternatives/java

    lrwxrwxrwx 1 root root 43 Sep 16 21:47 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java

    To switch to the JRE following I did

    sudo update-alternatives --config java

     Selection   Path                                           Priority  Status

    ------------------------------------------------------------

    * 0           /usr/lib/jvm/java-11-openjdk-amd64/bin/java     1101     auto mode

     1           /usr/lib/jvm/java-11-openjdk-amd64/bin/java     1101     manual mode

     2           /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java  1081     manual mode

     3           /usr/lib/jvm/java-8-oracle/jre/bin/java         1081     manual mode

    <Select 3>

    source ~/.profile

    sudo update-alternatives --config java

     Selection   Path                                           Priority  Status

    ------------------------------------------------------------

     0           /usr/lib/jvm/java-11-openjdk-amd64/bin/java     1101     auto mode

     1           /usr/lib/jvm/java-11-openjdk-amd64/bin/java     1101     manual mode

     2           /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java  1081     manual mode

    * 3           /usr/lib/jvm/java-8-oracle/jre/bin/java         1081     manual mode

    The JAVA_HOME variable was not set accordingly to the jre as well.

    Now run /STM32CubeProgrammer or STMCubeprogrammerIDE

    et voila ! :smiling_face_with_heart_eyes: Love...

     Plug in the STLINK and :face_with_tears_of_joy: .. too much love..

    0690X00000ARG24QAH.png