This script will install Java in Termux.
Libraries compiled by Hax4us, script written by Hax4us and MasterDevX.
To install Java, open Termux and execute the following command:
pkg install wget && wget https://raw.githubusercontent.com/MasterDevX/java/master/installjava && bash installjava
After that you can run Java using java
command.