Patrick Wright a écrit : > On Tue, Nov 11, 2008 at 3:43 PM, Charles Oliver Nutter > <[EMAIL PROTECTED]> wrote: > >> Greg Brown wrote: >> >>>> Is there a way to run Groovy so that it would not need to be signed? >>>> >>> I think this is the key question. The idea that apps can be written for the >>> Java Plugin using any JVM scripting language is very compelling; somewhat >>> less so if the code needs to be signed in order for it to work. >>> >>> Ken, can you offer any insight here? >>> >> I guess the key problem is being able to generate and load arbitrary >> code. In JRuby, that would happen in JIT mode and if methods are bound >> using generated stubs/invokers. But we also can just run interpreted and >> use reflection, which I think gets around the security issues. It >> seems like Groovy could do the same by precompiling, unless there's some >> additional code generation at runtime even when all code is precompiled. >> >> It seems like CLR/DLR/Silverlight would have to support code generation >> to allow IronRuby and IronPython to run. Assuming that's the case, why >> is their security model more permissive about this kind of thing than >> the Java plugin's? >> > > Are the problems in applets related to reflection or to creating > custom classloaders to load and cache newly-created bytecode, or ? > What calls are bouncing off the walls of the sandbox? > Interresting question, indeed. The problem is that to load new bytecodes you need to create a custom classloader and because Java security model relies on classloader too, to provide security context, you need to sign the applet.
The question is why do we have to relies on classloader to load new bytecodes and the answer is : we don't have to, AnonymousClassLoader (with no host class) is our friend. Too bad it's Sun VM specific . > > Patrick > Rémi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
