When running a Policy Server and upgrading the JVM version, the following command cannot be executed properly:
<name>@<host>:/tmp/jdk8u292-b10/jre/bin$ ./java -version
The command reports an error:
-bash: ./java: cannot execute binary file
The JDK package is:
OpenJDK8U-jdk_s390x_linux_hotspot_8u292b10.tar.gz
The file name OpenJDK8U-jdk_s390x_linux_hotspot_8u292b10.tar.gz stands for an s390 IBM for the mainframe (1).
Trying to run this JDK version on a Linux with an Intel processor, the error can be reproduced:
<name>@<host>:/tmp/jdk8u292-b10/jre/bin $ ./java -version
-bash: ./java: cannot execute binary file: Exec format error
Looking at the processor model the binary has been compiled for, the "file" command reports IBM S/390:
<name>@<host>:/tmp/jdk8u292-b10/jre/bin $ file ./java
./java: ELF 64-bit MSB shared object, IBM S/390, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, for GNU/Linux 2.6.32, not stripped
The Linux OS runs on an Intel Xeon processor (x64):
<name>@<host>:/tmp/jdk8u292-b10/jre/bin $ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz
The Linux kernel has been compiled for that processor version too:
<name>@<host>:/tmp/jdk8u292-b10/jre/bin $ uname -a
Linux <host>.example.com 3.10.0-1160.71.1.el7.x86_64 #1 SMP Wed Jun 15 08:55:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Install the latest 1.8 JDK version available for "x64" instead of "s390" processor to solve the issue (2).