STILL need help w. Security Exception

S

Steve Burrus

Hi all again, I still find myself in need of some help/assistance with
always getting the Java Exception "java.security.AccessControlException"
when I try to see a compiled Swing applet in my favorite web browser!!!
Here is a dump from the Java Console for your inspection :

"Java(TM) Plug-in: Version 1.4.1_02
Using JRE version 1.4.1_02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Stephen Burrus

Proxy Configuration: Browser Proxy Configuration

----------------------------------------------------
java.security.AccessControlException: access denied
(java.io.FilePermission tiger.gif read)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkRead(Unknown Source)

at sun.awt.SunToolkit.getImageFromHash(Unknown Source)

at sun.awt.SunToolkit.getImage(Unknown Source)

at javax.swing.ImageIcon.<init>(Unknown Source)

at javax.swing.ImageIcon.<init>(Unknown Source)

at ImageMap.<init>(ToolTipsBasedOnMousePosition.java:21)

at ToolTipsBasedOnMousePosition.init(ToolTipsBasedOnMousePosition.java:8)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)"
 
S

Steve W. Jackson

Steve Burrus said:
:Hi all again, I still find myself in need of some help/assistance with
:always getting the Java Exception "java.security.AccessControlException"
:when I try to see a compiled Swing applet in my favorite web browser!!!
:Here is a dump from the Java Console for your inspection :
:
:"Java(TM) Plug-in: Version 1.4.1_02
:Using JRE version 1.4.1_02 Java HotSpot(TM) Client VM
:User home directory = C:\Documents and Settings\Stephen Burrus
:
:proxy Configuration: Browser Proxy Configuration
:
:----------------------------------------------------
:java.security.AccessControlException: access denied
:(java.io.FilePermission tiger.gif read)
:
: at java.security.AccessControlContext.checkPermission(Unknown Source)
:
: at java.security.AccessController.checkPermission(Unknown Source)
:
: at java.lang.SecurityManager.checkPermission(Unknown Source)
:
: at java.lang.SecurityManager.checkRead(Unknown Source)
:
: at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
:
: at sun.awt.SunToolkit.getImage(Unknown Source)
:
: at javax.swing.ImageIcon.<init>(Unknown Source)
:
: at javax.swing.ImageIcon.<init>(Unknown Source)
:
: at ImageMap.<init>(ToolTipsBasedOnMousePosition.java:21)
:
: at ToolTipsBasedOnMousePosition.init(ToolTipsBasedOnMousePosition.java:8)
:
: at sun.applet.AppletPanel.run(Unknown Source)
:
: at java.lang.Thread.run(Unknown Source)"

It's telling you exactly what the error is. You're evidently trying to
read a local file (tiger.gif) on the local filesystem from an unsigned
applet.

= Steve =
 
S

Steve Burrus

Roedy said:


Roedy, while I really do appreciate your attempted help/assistance with
my problem with getting that Java Exception, I must say that you have
sent me that link to your website before, and I went to it, BUT it
really didn't help me out at all!!!

I mean, I never saw any explicit reference to my specific problem with
getting that "javax.security. AccessControl java.io.FileNotFoundException"!!

Do u feel like helping me out of my "terrible" [sic] problem or not, I
might directly and pointedly ask you right now??? And after you have
answered my question of you, I would like to know just what your
"mindprod.com" is??? Are you based up there in Canada??? In what city
anyway? But back to this exception, I HAVE corrected this problem in
the past by putting this line of code into the file : (now this is
trying to get a graphic file seen. )

"ImageIcon ic = new
ImageIcon(getClass().getResource("['nameofgraphicfile']"));
 

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,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top