I wan't to create an applet that includes the Java compiler and is able to download and compile .java files from the web (or from a textfield for that matter). From what I understand, the Java compiler is based on Java, so this should be possible. However, one thing I wonder is wether the Java compiler is able to store the class file in memory or that it needs explicit disk access. Also, I want to catch the errors javac produces, but this is natural.
Is there an article on this somewhere maybe? I couldn't find much on the case. What troubles could I walk into?
EDIT: I'm planning on using the applet with OpenCL, so I would have to sign the applet.
EDIT: Similar question here: Hosting the Java compiler in an applet or in Google AppEngine?