1

I'm trying to install Java on a linux busybox distro in order to run a java app on arm32 arch (raspberry pi for example).

I downloaded serveral type of jdk11: Official Openjdk, zulu, bellsoft.

I decompressed its and copy all downloaded jdk11 to an ext4 usb key. I use ext4 usb key in order to eliminate symlink error when i copied folders.

Then when i try to run java command in order to get a version java version but nothing happen.

If jdk's are decompressed using a standard user (non root), nothing happen as described before. If i decompress its using a root user, i faced issue: libjli.so: internal error: error while loading shared libraries (may be right access ?).

The error displayed is "./bin/java: error while loading shared libraries: /home/lib/asRoot/jdk-11.0.6/bin/../lib/jli/libjli.so: internal error" when i execute java -version command. libjli is in the path ...

Any hints of how to run JRE for arm32V7 on busybox distro ?

Thanks ...

Otman El
  • 49
  • 4
  • What BusyBox distro? What C library does it use? – tttapa Jan 28 '20 at 17:10
  • Hi, thanks for quick reply ... it 's BusyBox v1.29.3 – Otman El Jan 28 '20 at 18:24
  • AFAIK, BusyBox is not a Linux distribution. What Linux distribution are you using, and most importantly: what C library does it use? – tttapa Jan 28 '20 at 18:28
  • Sorry but i'm only try to run a java on an hardware that's not mine. Only info i've currently is the linux version which is Linux version 4.9.37 and glibc 2.24 version. This is a minimalist linux as some command are not available – Otman El Jan 28 '20 at 19:12
  • Good, so it uses glibc. My guess is that the linker cannot find the necessary, either because you didn't install them, or because they are on the usb key, but not in the rpath, and not in the ld library path. Please add the exact error message to your post. The way you asked it, this question doesn't have a straightforward answer. You might have more luck on a discussion forum instead of a Q&A site like this one. – tttapa Jan 28 '20 at 19:27
  • Exact error i had with offical downloaded openJdk11 and others is: ."/bin/java: error while loading shared libraries: /home/lib/asRoot/jdk-11.0.6/bin/../lib/jli/libjli.so: internal error" when i execute java -version command – Otman El Jan 29 '20 at 08:40
  • @Otman El: Where exactly did you get your Linux distribution and you JDK from ? please copy/paste the exact URLs if applicable. If you did build it by yourself, could you please tell us how ? The goal here would be for you to provide enough information so that somebody wanting to help you and having a raspberry pi 3 could download both the Linux distribution and the JDK you are experimenting issues with: if you are withholding too much important information, people will not be able to help. – Frant Jan 29 '20 at 19:20
  • @Otman El: What exactly is the hardware platform you are experimenting with, i.e. exact brand/model ? – Frant Jan 29 '20 at 19:56
  • @Otman EI: For example, this [JDK](https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz) is working fine on an Allwinner H3 Cortex-A7 platform running Armbian: – Frant Jan 29 '20 at 20:09
  • Hi everyone, thanks for your feedback. @Frant i used official jdk and some others. The provider notified me that the hardware was a hardfloat version so i downloaded and tried to install a jdk-armv7-hf (hard floar version) ... this is why i had issue when trying to run java command. But when i switch on soft float version, that worked succesfully ... i'll check it with the provider ...With a jdk-armv7-sf version, i'm able to run a java program – Otman El Jan 30 '20 at 15:52

1 Answers1

0

The Eclipse Temurin makes builds of TLS versions for the arm32v7 platform.

Your Linux may be compiled with musl library instead of gnu. Then you can try OpenJDK 8 from Alpine Linux. The OpenWrt is also based on musl so see Java on OpenWrt

Sergey Ponomarev
  • 2,947
  • 1
  • 33
  • 43