Searching the web I've found that the Javac compiler is written in Java, and I also peeked at the source on Sun's site. The source is quite big and I couldn't make any headway on it. Also the Eclipse project has a compiler embedded inside, but who could touch its source code ;-).
So I thought I'd throw a couple of questions your way:
- Could the Java compiler be hosted in an Applet?
- Could the Java compiler be made to work on GAE, with dynamic loading of the resulting class files from the datastore?