Here is the code I use to create my image :
System.out.println("URL :
"+applet.getClass().getResource("/images/root.png").getPath());
root = new
ImageIcon(applet.getClass().getResource("/images/root.png").getPath());
And here is what appletviewer output :
URL : file:/C:/Program Files/Apache
Group/Apache/doc/applet1.jar!/images/root.png
java.security.AccessControlException: access denied (java.io.FilePermission
file:
/C:/Program Files/Apache Group/Apache/doc/applet1.jar!/images/root.png read)
at
java.security.AccessControlContext.checkPermission(AccessControlContex
t.java:272)
at
java.security.AccessController.checkPermission(AccessController.java:3
99)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkRead(SecurityManager.java:890)
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:266)
at sun.awt.SunToolkit.getImage(SunToolkit.java:280)
at javax.swing.ImageIcon.<init>(ImageIcon.java:77)
at javax.swing.ImageIcon.<init>(ImageIcon.java:103)
at injecteurdvb.MyCellRenderer.<init>(MyCellRenderer.java:29)
at injecteurdvb.Applet1.jbInit(Applet1.java:352)
at injecteurdvb.Applet1.init(Applet1.java:282)
at sun.applet.AppletPanel.run(AppletPanel.java:344)
at java.lang.Thread.run(Thread.java:484)
My applet and icons are in the same jar file applet1.jar, and my applet is
in a package : injecteurDVB.
I don't know if my path to the icon is good, and if it is I don't know why
I've got this exception.
Thx for help
"Christophe Ronco" <ron...@thmulti.com> wrote in message
news:9mlkhe$qr5$1...@reader1.fr.uu.net...