Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Java 21 on Termux?

So Java 21 is already out but not even Java 20 is accessible on Termux. Is there any alternative way to use Java 21 on Termux or any IDE supported Java 21 on Android Phone?

I tried to install it on termux using the pkg install openjdk-21 but it didn't work Installing Command

Result

like image 668
Serella Avatar asked Feb 22 '26 23:02

Serella


1 Answers

To install Java 21 on Termux:

  1. Download the jdk21 tar file from the official website. (If you want it for Termux, you need to download the aarch64 version.)
  2. Extract the file with the tar -xvf command.
  3. Add the Java folder to the path.
  4. Run the Java command. (If you encounter an execution error, try it with pkg install glibc-repo glibc-runner -y and grun java.)
like image 179
Musa Avatar answered Feb 24 '26 14:02

Musa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!