Is there a Java IDE for iPad which can compile and run Java locally?
There are web-based IDEs that support Java like IDE One and CodeBox that should work from an iPad. Obviously there are limitations with both but they might suffice.

This is my immediate thought, because I believe Apple have rules against people creating apps that include their own runtime. Which I'd assume you'd require if you wanted to compile Java code directly on an iOS device.