A
Andrew Thompson
I've *often* wondered if there wasn't a way for a pluggin (or somesuch) to
take an example from a post and run it.
I had the same thought. That is part of the reason I encourage the
<sscce></sscce> brackets around the ..SSCCE's to help identify them.
[ Which, of course, does not help your wider concept of allowing _multiple_
source files much - since it limits the code to a single .java file. ]
The original (only ever partly formed) idea was to allow import directly
into the Java On-Line Compiler at my site (put the message id in a page
at the site and a .JSP fetches it from an archive, parsing the content
for the source code ), which would then..
Now, it would be fraught with peril, but I also had this concept.
...launch the application/applet directly out of an *applet*.
Note that an application/applet launched by an unsigned applet in this
way - automatically gains the standard applet security sandbox.
With that, the security problems are largely solved. OTOH it also
means the scope of the code samples would be limited (no File I/O,
limits on system properties checks etc.).
I would also look to intervene in the applet context that you hand
to any applets launched, to help prevent silly things like the applet
opening 2 copies of itself in target "_blank".
I suspect that might cover most ways that code off the net might
be tamed, but have vague worries that even that is not enough.
[ ..Maybe it is best I never got around to that project. ]