On Tue, Dec 2, 2008 at 10:24 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > Proxy generation was the last runtime code-gen/classloader > requirement. So the path is clear for building Clojure apps without > runtime codegen, for delivery in those environments that preclude it > (e.g. Android, unsigned applets). Looking forward to feedback from > people trying to reach those targets.
You asked for it. :-) Here's a minimal applet .clj: (ns net.n01se.Tree (:gen-class :extends java.applet.Applet)) Since it's missing a main fn, I would expect an exception like the this: java.lang.UnsupportedOperationException: net.n01se.Tree/-main not defined (NO_SOURCE_FILE:0) Using svn 1136 I can compile and get the above exception from a normal Clojure REPL, but if I try to use it as an applet: $ appletviewer test.html java.lang.ExceptionInInitializerError at clojure.lang.Namespace.<init>(Namespace.java:31) at clojure.lang.Namespace.findOrCreate(Namespace.java:116) at clojure.lang.Var.internPrivate(Var.java:95) at net.n01se.Tree.<clinit>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at sun.applet.AppletPanel.createApplet(AppletPanel.java:798) at sun.applet.AppletPanel.runLoader(AppletPanel.java:727) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:636) Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createClassLoader) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) at java.security.AccessController.checkPermission(AccessController.java:553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:611) at java.lang.ClassLoader.<init>(ClassLoader.java:218) at java.security.SecureClassLoader.<init>(SecureClassLoader.java:71) at java.net.URLClassLoader.<init>(URLClassLoader.java:99) at clojure.lang.DynamicClassLoader.<init>(DynamicClassLoader.java:30) at clojure.lang.RT.<clinit>(RT.java:243) ... 14 more You can see it found my class okay, but it looks like there may be some dynamic classloader stuff still going on? --Chouser --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---