Hey guys,
I'm a little new to the forum but trying to finish up an
applet, and can't seem to get it to display. I get a gray box with a little red X up in the left hand corner. I'm running IE6 with swing enabled. The error message I get is attached below. I believe it has to do with my use of the exists() method of the File class from the package java.io. I have looked high and low and found little to nothing. Any idea how I can get my applet to work? I also forgot to mention that the directory "images" is in the same directory as in the class and holds jpg images for retrieval and display. There is no creating or writing files going on, only reading, which is why I'm so confused. I'm currently on Windows XP.
Java(TM) Plug-in: Version 1.4.2_05
Using JRE version 1.4.2_05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\jkong
Proxy Configuration: No proxy
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump
thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
java.security.AccessControlException: access denied (java.io.FilePermission images/SecureDoorLogo.jpg 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 SecureDoorApplet.<init>(SecureDoorApplet.java:15)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
-Jkong
[ November 05, 2004: Message edited by: Jkong Jkong ]