cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer will neither run or install on macOS

fred bar
Senior

Hi.

I believe that this is related to the presence of recent JDK, but since i had to move to 1.8+ (jdk11 and JDK12), program stopped working.

Starting installer or previously created program just fails silently. Logs reveal nothing except an abrupt exit with return value of 1.

I of course tried to change default jdk to 1.8 but that did not help. Being a developper and needing all other JDKs on a daily basis, deinstalling other JDKs is not possible.

Does anyone have any idea of what is going on?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
fred bar
Senior

Hi there.

Thanks @Houda GHABRI​ , that worked.

For reference and documentation, i'll include the whole bash solution below for everyone to use simply.

This is for macOS only, by the way and also one would have to adapt to the specific jdk installed.

cd  /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin
/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java -jar STM32CubeProgrammer

Have a great day.

View solution in original post

7 REPLIES 7
DHard.1
Associate

Hi,

I have the same problem.

(https://community.st.com/s/question/0D53W00000GW7e7SAD/stm32cubeprogrammer-250-fails-to-open-on-macos-catalina-v-10156)

I did mangage to install STM32CubeProgrammer but it silently fails to launch as yours does.

It is frustrating because i have managed to set up all the other Cube software without a problem.

I had jdk11 installed but removed it and installed jdk1.8 and the other Cube software still works without any problems.

If you need jdk11 for other projects, how do you swap between the jdk's or are you running them all in parallel? (i've not had a lot of experience with java).

fred bar
Senior

Hi. There are various ways to switch from jdk to an other but none works in this case. i can effectively change default/local/global jdk but that does not run anyway.

See here for some of the ways: https://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x

Houda GHABRI
ST Employee

Hi @fred bar​ ,

For CubeProgrammer only Java8 and OpenJDK8 are supported. 

You must set java8 as your default Java Runtime .

If you still have an issue you can follow those steps :

To install CubeProgrammer:

"your java path/bin/java -jar SetupSTM32CubeProgrammer-2.5.0.exe"

To run CubeProgrammer:

  • Go to STM32CubeProgrammer installation folder
  • run STM32cubeProgrammer by "your java path/bin/java -jar STM32CubeProgrammer.exe"

Feel free to contact for furthers details.

regards,

Houda

fred bar
Senior

Hi there.

Thanks @Houda GHABRI​ for your confirmation.

As other tools now work with modern jdk, i do expect logic to keep on with that tool being 'promoted' too. Is there any way to know if/when this is planned to happen?

fred bar
Senior

Hi there.

I used your advice to successfully install the application (using the .exe), but then it quite failed.

Starting the app directly (no exe, just the .app) obviously fails. Installer would not output a .exe , which could have been better but i found no way to make it think i was using windows.

I was able to start the application using

/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java -jar STM32CubeProgrammer.app/Contents/MacOs/bin/STM32CubeProgrammer

but all i got was this:

0693W000003R8AyQAK.png

Tried various -cp arguments, including all libs and whatevers i could find but was not able to please it. If you have any proposal for a fix, i'll be willing to check and report.

Houda GHABRI
ST Employee

Hi @fred bar​ ,

Try to launch the command while beeing in CubeProgrammer install folder : STM32CubeProgrammer.app/Contents/MacOs/bin/.

Tell me please if it is OK.

regards,

Houda

fred bar
Senior

Hi there.

Thanks @Houda GHABRI​ , that worked.

For reference and documentation, i'll include the whole bash solution below for everyone to use simply.

This is for macOS only, by the way and also one would have to adapt to the specific jdk installed.

cd  /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin
/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java -jar STM32CubeProgrammer

Have a great day.