How to install jdk for offline compile? I want to compile java offline.  

I have project on PC, will just copy and make small changes to it, and test it, when I am away from home.  

Doesnt need to be an IDE. Not even code editor. Just a working compiler.

No need to be an app apk, a method to install it thru usb adb would suffice.

I am looking for a 100% free option too.
If your project only uses Command Line Interface, and only uses sub-packages from java.lang , then you can try "TERMUX" android app, it's a terminal emulator, so you should be familiar with linux terminals.

As of now , it doesn't have the entire JDK, but I can provide you a package that has basic tools like javac and jar, 
that you could use with termux.
BUT if your project uses AWT classes, this method won't help.