Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 669 Bytes

README.md

File metadata and controls

30 lines (25 loc) · 669 Bytes

run_java

Run java program in termux.

Because the JDK is too big to install in termux.
So it has another way to run Java program in termux---ecj.
This script can automatically install ecj, dx and termux-tools in termux to run Java program.

Install

pkg i git ecj dx -y
cd ~
git clone https://github.com/HemanthJabalpuri/run_java
cd run_java
sh install.sh

Run java program

javac <JavaFile>.java
java <JavaFile>

example:

cd ~/run_java
javac ./Test/HelloWorld.java
java ./Test/HelloWorld

Note:- javac produces dex file which is finally executed by Dalvik Virtual Machine that comes with all android devices.