How can I compile java code from an arbitrary string (in memory) in Java 5 and Java 6, load it and run a specific method on it (predefined)?
Before you flame this, I
Run inside a web container like Tomcat and first generate a JSP page, and then invoke it.
This also allow you to get rid of the old class definitions by simply overwriting the JSP page instead of having your classloader slowly run full.
Is the "in-memory" requirement due to speed or due to not changing the code base?