I want to build Java sources dynamically and compile them - and of course run the generated classes FROM MEMORY (i.e. without generating files, just to stress this as much as I can :-)).
I know it's "always" been possible to invoke javac, but for one thing, I don't like accessing a "com.sun.java.tools..."-pa
ckage, and also, this required java source files.
It looks like this has become a lot easier in Java 6 and I've come across a "solution" at
Unfortunately, it doesn't work 100%: The compilation succeeds, but the (attempted) call results in a ClassNotFoundException.
Who can help me solve this? I'd hope it's just a small thing... the folks at java2s.com wouldn't post sample code that is untested and broken, would they? :-)