Static factory method doesn't work -- non-static does!

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. ;) ]
 
T

Thomas G. Marshall

Andrew Thompson coughed up:

....[rip]...
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. ;) ]


Not sure.

I think the best bet would be simply to eyeball the code sufficiently before
handing it off to the CNR(compile-n-runner). The CNR would know /nothing/
about safety, and have no sandbox, save for your own noggin.

*I WOULD HOPE* that the people who are interested in such a CNR in these
ng's would know enough to not just cut, paste and hope. :)



--
Having a dog that is a purebred does not qualify it for breeding. Dogs
need to have several generations of clearances for various illnesses
before being bred. If you are breeding dogs without taking care as to
the genetic quality of the dog (again, being purebred is *not* enough),
you are what is known as a "backyard breeder" and are part of the
problem. Most of the congenital problems of present day dogs are
traceable directly to backyard breeding. Spay or neuter your pet
responsibly, and don't just think that you're somehow the exception and
can breed a dog without taking the care described.
 
T

Thomas G. Marshall

Thomas G. Marshall coughed up:
Andrew Thompson coughed up:

...[rip]...
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. ;) ]


Not sure.

I think the best bet would be simply to eyeball the code sufficiently
before handing it off to the CNR(compile-n-runner). The CNR would
know /nothing/ about safety, and have no sandbox, save for your own
noggin.
*I WOULD HOPE* that the people who are interested in such a CNR in
these ng's would know enough to not just cut, paste and hope. :)


I've not worked with the security manager for years and years, but otherwise
I'm assuming that I could sufficiently modify the class loader such that it
detects and places an ENORMOUS warning window in your face when certain
classes are used. {shrug}



--
Having a dog that is a purebred does not qualify it for breeding. Dogs
need to have several generations of clearances for various illnesses
before being bred. If you are breeding dogs without taking care as to
the genetic quality of the dog (again, being purebred is *not* enough),
you are what is known as a "backyard breeder" and are part of the
problem. Most of the congenital problems of present day dogs are
traceable directly to backyard breeding. Spay or neuter your pet
responsibly, and don't just think that you're somehow the exception and
can breed a dog without taking the care described.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148
Top