2

I want to install and use Java 8 on Android 4.4. Using Termux is not an option because it requires a minimum of Android 5.0. I do have root access.

I tried to install the ARM version of Java using rpm, which worked but it is not usable. When I go to the /bin directory and run ./java -version, it gives me an error ./java: not executable : magic 7F45.

Is there a way to install and run Java on a rooted Android phone, without the use of Termux?

5
  • 1
    What type of Java application are you trying to execute? A command-line application or one with a GUi? The latter can not work. For a command-line app there might be a way to load the code into an app and run it in Android's Dalvik VM..
    – Robert
    Commented Sep 13, 2021 at 2:56
  • @Robert The java application is a command-line application. To be more specific, it is a Minecraft spigot server. Commented Sep 13, 2021 at 5:04
  • I don't think your phone meets the requirements of Minecraft spigot. For 1-10 players 1GB RAM is recommended. Most Android 4.4 devices had 1GB RAM and less in total. Therefore at run-time a maximum of ~500MB RAM is free.
    – Robert
    Commented Sep 13, 2021 at 7:26
  • For CLI apps you can covert the .class files to Android-specific .dex format using Android SDK (search for d8 tool) provided that all Java APIs used in the app are part of Android runtime. Then run Android RT on the device, instead of Java RT. /system/bin/app_process is Android's equivalent to java which forks a new VM from always running Zygote VM. Commented Sep 13, 2021 at 8:50
  • @Robert I have run a 1.8 server on a debian stretch run on the same device using linux deploy and it ran fine with 2 players(The device became unresponsove cause lack of RAM). Commented Sep 13, 2021 at 14:31

0

You must log in to answer this question.

Browse other questions tagged .