Is there a Java compiler for Android?
I'm not an Android developer but I do other stuff.
I just rooted my phone so I was playing around with a shell and I was trying to compile some C packages and realized there is no C compiler, OK.
Surely there must be Java right? Tried it and I can't get a java or javac command to work either.
How is that possible when Android apps are written in Java?
Regarding Java compiler for Android - ECJ (Eclipse Compiler for Java) can be ported very easily on Android. I've done it - but no support for Java 8 though.
Also, it is possible to build Android apps on Android, there are apps that already exist for that, JavaIDEdroid is one.