cancel
Showing results for 
Search instead for 
Did you mean: 

With Windows 10 I installed openjdk version 1.8.0_222 but STM32CubeMX does not see that openjdk is there. Says it can not find java runtime environment. The readme with STM32CubeMX said openjdk would work.

Paul Hankins
Associate II

After Oracle announcement related to ‘End of Public Updates for Oracle JDK 8’, you can access OpenJDK 8 via https://adoptopenjdk.net/. But it will not

5 REPLIES 5
Pascal Rosin
Associate II

Same for me, I installed the OpenJDK 8 JRE. The output of `java -version` is the following:

C:\>java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

The Installation program of STM32CubeMX-5.5.0 opens a window with the message "This application requires a Java Runtime Environment 1.8.0_45". The installation does not continue.

I had a similar problem, but STM32CubeMX was already installed in my machine. I couldn't use the software after I removed Oracle JRE in favor of OpenJDK. The message was the same as yours: "This application requires a Java Runtime Environment 1.8.0_45".

However, after a lot of searching, I saw someone running an executable directly with java (I don't recall whether it was the setup file or the actual software executable). So, I opened a cmd at my installation directory and executed:

java -jar STM32CubeMX.exe

And it worked. After that, I edited my shortcut in desktop to use `java -jar` as well.

I suggest you try the same with the setup file.

By the way, I'm using OpenJDK 13.0.1 and it seems to work fine.

Interesting, I tried to install CubeMX with an Oracle Java installation, after uninstalling this and installing the AdoptOpenJDK, I tried to run it from the command line, but it was not working. After installing CubeMX with

java -jar SetupSTM32CubeMX-5.5.0.exe

from an administrator command line, I can now start CubeMX from the start menu without even changing the shortcut.

Sadly this does not work for the STM32CubeProgrammer.

rwx
Associate III

To easily fix this, install AdoptOpenJDK with the following settings:0693W000001cFYDQA2.png

shadab abedin
Associate II

thanks @Community member​  lastly it work after installation of adoptOpenJDK.Thanks Alot