cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32CubeMx and Java version

Uwe Bonnes
Principal II
Posted on February 18, 2016 at 12:04

Hello,

trying to install ./SetupSTM32CubeMX-4.13.0.linux from recent stm32cubemx.zip on a Opensuse 13.2/64 Bit system, I get:

> ./SetupSTM32CubeMX-4.13.0.linux

Please install Java JRE 1.7.0_45 or a more recent version

However a recent java runtime is installed:

 

> /usr/lib64/jvm/jre/bin/java -version

openjdk version ''1.8.0_72''

OpenJDK Runtime Environment (build 1.8.0_72-b15)

OpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)

and stracing the installer shows that ''/usr/lib64/jvm/jre/bin/java -version'' is queried by the installer

1.8 should be more recent than the requested JRE 1.7.0_45. What is wrong here?

6 REPLIES 6
Nesrine M_O
Lead II
Posted on February 18, 2016 at 15:38

Hi bonnes.uweNo,

Thank you for your feedback. The issue has been reported internally.

-Syrine-

sivan606
Associate
Posted on March 10, 2016 at 20:07

Use Oracle Java SE instead of OpenJDK.

felixvollmer
Associate
Posted on March 12, 2016 at 11:40

Assizov.ivan already said: STM32cubeMX checks for oracle java. If you don't want to install oracle java, you could try to fake the version string. I used this script:

#!/bin/sh
REALJAVA=''/usr/bin/java''
if [ ''$#'' = 1 ]
then
if [ ''$1'' = ''-version'' ]
then
>&2 echo 'java version ''1.8.0_66-internal'''
>&2 echo 'Java(TM) SE Runtime Environment (build 1.8.0_66-internal-b17)'
>&2 echo 'Java HotSpot(TM) 64-Bit Server VM (build 66-b17, mixed mode)'
else
$REALJAVA ''$@''
fi
else
$REALJAVA ''$@''
fi

Place this script into the same folder as the installer (file name ''java'' with the executable bit set) and execute (in the same folder) ''PATH=.:$PATH SetupSTM32CubeMX-4.1.linux''. After installation I placed the same dummy java script at the installation directory (where theSTM32CubeMX executable is). Renamed the executable ''STM32CubeMX'' to ''STM32CubeMX_'' and created a dummy for it:

#!/bin/sh
INSTALLPATH=''$HOME/STMicroelectronics/STM32Cube/STM32CubeMX''
PATH=$INSTALLPATH:$PATH $INSTALLPATH/STM32CubeMX_

This solution isn't pretty but it works for me. Good luck. I hope they fix the version string checking in the future.
stm32cube-t
Senior III
Posted on March 22, 2016 at 19:19

Dear user,

This is fixed in STM32CubeMX 4.14.
Posted on October 20, 2017 at 19:55

I have 

STM32CubeMX 4.22.1 and the problem is still present... (Java 1.8.0_151 installed)

A Pica
Associate II
Posted on January 03, 2018 at 17:43

I've just tried 

Cube 4.23 with JRE 9 and 9.0.1, and neither of them works.

I had to install 

1.8.0_151 at the same time (it seems to work now).