Hi,
I'm trying to use the Java2D API from a Scheme applet. But I'm getting
an permissions error:
(.getTransform graphics )
graphics =
sun.java2d.SunGraphics2D[font=java.awt.Font[family=Dialog,name=Dialog,st
yle=plain,size=12],color=jav...
bird = ((233 . 501) 2 . -1)
color = java.awt.Color[r=0,g=0,b=255]
====================================
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.awt)
It seems that the applet support in Jscheme is geared towards JDK 1.1.
So I modified SchemeApplet.java to extend JApplet instead of Applet.
Same result. I implemented the 'paint(Graphics g)' method in
SchemeApplet using the API that is yielding those access control
exceptions, and in this case it works. If, instead, my
SchemeApplet.paint method calls a scheme proc for painting (in the same
way that the 'start' and 'init' procs are called for example), then I
get the access control problem above. Conclusion: looks like the
permissions block happens only when those APIs are used through
reflection (I don't think it has anything to do with class loading
issues), by the Scheme interpreter.
Any idea?
Best,
Borislav
|