Thompson
Your code is trying to access a file in the local system i,e the client who
is downloadin the web page.As you dont have access to read a gif file from
the client machine there is a security exception.
>From your applet you can make a URLConnection to the server and request the
gif file .
HTH,
Arun
-----Original Message-----
From: Thompson Willard [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 03, 2000 2:50 AM
To: [EMAIL PROTECTED]
Subject: Security Violation???
Has anyone gotten this error while trying to simply read a gif file from the
server using an applet?
java.security.AccessControlException: access denied (java.io.FilePermission
d:\inetpub\wwwroot\dev\bullet_d.gif read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkRead(SecurityManager.java:890)
......
I went through all of the proper steps to make my applet a jar and signed it
using keys, ..., etc.
My applet compiles and all I do is set up an icon and display it:
Icon icon = new ImageIcon("d:\\inetpub\\wwwroot\\dev\\bullet_d.gif");
JLabel label = new JLabel("Description", icon, SwingConstants.RIGHT);
Container panel = getContentPane();
panel.setLayout(new FlowLayout());
panel.add(label);
Does anyone know what I should do, set up a socket??, fiddle with the
java.security??, any examples anywhere??
Thanks in advance.
- Willard Thompson
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html