Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.ExceptionInInitializerError: java.security.AccessControlException

0 views
Skip to first unread message

hajar

unread,
Mar 29, 2002, 1:47:25 PM3/29/02
to
hello,
i write an applet wich communicate with his server in order to get an
image from it and then transform it.
so the first step which is getting image is done but only using
appletviewer
(when i try to view my applet using the browser the applet can't
initialize)
i can view the image
/****************/
fileURL = new URL(getCodeBase()+"bonj1.gif");
Image awtImage = Toolkit.getDefaultToolkit().getImage( fileURL);
/***************/
but when i add this instruction

RenderedOp image = JAI.create("awtimage", awtImage);

i get this error:
/********************/
java.lang.ExceptionInInitializerError:
java.security.AccessControlException: acc
ess denied (java.util.PropertyPermission java.home read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12
78)
at java.lang.System.getProperty(System.java:560)
at com.sun.media.jai.util.PropertyUtil$1.run(PropertyUtil.java:89)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.media.jai.util.PropertyUtil.getFileFromClasspath(PropertyUtil
.java:114)
at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistr
y.java:360)
at javax.media.jai.JAI.<clinit>(JAI.java:382)
at TestApplet0.init(TestApplet0.java:88)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
/********************/

so do you have any idea on this?is this in relation with the
java.security file and the java.policy file
and why i can get the image using appletviewer and i can't with the
browser(IE5.0)
i use jdk1.3.1
thanks in advance

VK

unread,
Apr 3, 2002, 6:04:03 PM4/3/02
to
So where is the mistery?
Java tells you that one of classes is trying to access local system settings
in java.home.
Of course it cannot do it from within the send box.
Why does it need to access the system just to process an image - this is
really a mistery.
If you need to change the picture (colors, transformations etc.) I would
suggest to use the original classes from java.awt.image
All this com.blah.blah. junk never works as advertised. :-)


hajar <h_elma...@hotmail.com> wrote in message
news:e6194e98.0203...@posting.google.com...

0 new messages