Issue
I have activate 64bit kernel on my Raspi4:
pi@pc:~ $ uname -a
Linux pc 5.10.63-v8+ #1496 SMP PREEMPT Wed Dec 1 15:59:46 GMT 2021 aarch64 GNU/Linux
pi@pc:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
I'm trying to run latest java version (original Oracle Arm 64-bit version) on my machine. Though, running the binary results in a file not found error despite the file being present and executable:
pi@pc:~ $ /usr/lib/jvm/jdk-17.0.1/bin/java -version
bash: /usr/lib/jvm/jdk-17.0.1/bin/java: Datei oder Verzeichnis nicht gefunden
pi@pc:~ $ ls -la /usr/lib/jvm/jdk-17.0.1/bin/java
-rwxr-xr-x 1 root root 70856 Sep 27 19:45 /usr/lib/jvm/jdk-17.0.1/bin/java
Only ldd command giving an indication, program not dynamically linked:
pi@pc:~ $ ldd /usr/lib/jvm/jdk-17.0.1/bin/java
das Programm ist nicht dynamisch gelinkt
file command showing the following output:
pi@pc:~ $ file /usr/lib/jvm/jdk-17.0.1/bin/java
/usr/lib/jvm/jdk-17.0.1/bin/java: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped
pi@pc:~ $ file /usr/lib/jvm/jdk1.8-oracle-ARM32/bin/java
/usr/lib/jvm/jdk1.8-oracle-ARM32/bin/java: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.26, BuildID[sha1]=c61f921ef55f64705b9f360005fb2b77e4a81ac3, not stripped
I'm not an expert in C/C++ programming. Is there any way, the executable can be run on my Raspi?
Solution
I'm using a custom Raspberry image for 64-bit. I also ran into this problem. I'm using Raspios: https://downloads.raspberrypi.org/raspios_lite_arm64/images/
With the next image, you can install java 17 on the PI. So far no problems with running Java jar's.
Answered By - Stijn Leenknegt Answer Checked By - Clifford M. (WPSolving Volunteer)