Skip to content

Unable to install JDK 16 on RPi

I want to install the JDK 16 on a RPi 3B and I downloaded the Linux ARM 64 Compressed Archive from the Oracle site. Every time I run the command to check the version of java I get the same error: bash: ./java: cannot execute binary file: Exec format error

I already tried to untar it again and download the archive from zero, but I get the same error every time. Considering the RPi 3B not able to support the JDK16 for some reason, I downloaded and installed the Kit on a RPi 4 too, but the result is always the same. I used the checksum to make sure the downloaded archive was intact and it was.

Am I downloading the wrong package or have I missed anything important?

uname -a: Linux raspberrypi 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l GNU/Linux
file ./java: jdk-16.0.1/bin/java: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/, for GNU/Linux 3.7.0, not stripped


It seems you are running a 32 bit ARM Linux (armv7l), you therefore cannot execute a 64 bit aarch64 JDK. You need to install the 32 bit version, the same way you installed the 64 bit JDK, or to install a 64 bit Linux distribution on your system.