2020-09-01 04:51 AM
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.
Solved! Go to Solution.
2020-09-11 10:45 AM
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.
2020-09-01 07:49 AM
Hi,
I have the same problem.
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).
2020-09-01 08:25 AM
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
2020-09-07 04:06 AM
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:
Feel free to contact for furthers details.
regards,
Houda
2020-09-08 04:51 AM
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?
2020-09-09 01:19 AM
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:
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.
2020-09-10 06:05 AM
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
2020-09-11 10:45 AM
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.