Skip to content

amuramatsu/termux_java

Repository files navigation

This is another try to run JavaVM on termux

PROGRAMS IN THIS REPOSITORY ARE OBSOLATED

OpenJDK 17 package is created as termux official package. If you want to use JavaVM on termux, please type

pkg install openjdk-17

in termux.

Information

This repository have not JavaVM itself, but contains builder of Java system for termux.

The Java system built by this scripts is not compiled myself, that is based on other OpenJDK binary distribution and modify it to suitable for termux.

This project is inspired from https://github.com/MasterDevX/Termux-Java and https://github.com/Hax4us/java .

Limitations

GUI is not supported

Supporting GUI requires too many libraries.

How to use

Requirements

Usage

$ ./make_termuxjava.pl [-a arch] [-d distribution] [-v version]
  • arch is supported only aarch64 (default), armv7 and armv6.

  • distribution is selected from adopt (AdoptOpenJDK) or liberica (LibericaJDK). AdoptOpenJDK is recommended.

  • version is version of JDK. I tested only 8LTE and 11LTE

You get `termuxjava-jdk?-{version}-{distribution}-{arch}.tar.gz. This archive contains install script and Java system. Copy the archive to android-termux and install.

What is doing in this script.

  1. Download OpenJDK from AdoptOpenJDK or LibericaJDK

  2. Download shared-libraries needed by JDK from archlinux ARM

  3. Modify JDK binary and library for using above libraries (by PatchELF)

  4. Packaging JDK, libraries, font settings and wrapper scripts.

Tested environments

Build

  • NetBSD 9.1-STABLE (amd64)

JDK Distribution

Running environment

Tested Java applications

Acknoledgements