I've a problem with some things in Internet Explorer.
When I make a applet and run it in my IDE or Firefox its work, but when I run it in Internet Explorer, I got a message: access denied (...)
I got that error when I run a RMI script.
or when I load and draw an Image.
Does someone know how I can fix it?
When you get errors, please copy and paste the full text of the message.
What versions of Java and Firefox are you working with?
I got the error message in Internet Explorer 8.0.
Because it's a applet it's doeing "ex.getMessage()" thats only one line.
By loading an image I got this error:
access denied(java.io.FilePermission images\backgrounds\background1.png read)
By starting an RMI program I got this error:
access denied(java.net.SocketPermission 127.0.0.1:1099 connect, resolve)
I've Firefox version 3.6.3
I've Java JDK version 1.6.0_20
I've Java JRE version 6
(and Internet Explorer 8.0)
applets cant access the file system
you have to sign them i think
Your code needs permission to look at the local system. One way is sign the applet. Another is to make changes to the local .java.policy file on the user's computer.
I've already tried to set all classes and images in a jar file, and signed the jar file.
but than I got the error:
Can't read input file
This sounds like a completely different animal than your prior problem of "access denied" and may be due to your trying to read the image as a file rather than as a resource or perhaps looking in the wrong location. My suggestion: show your code and your exact error message.
Originally Posted by Dennis
That's interesting that the unsigned version worked in FF 3.6.3 and fails in IE8. I would have thought it would fail in all browsers. Do you have a .java.policy file that gives permissions for anything?
Sorry for my very late reaction.
I've allready solved it.
When useing an applet it only work when open a file with URL, File doesn't work.
and with my RMI server i've get it working (at my own computer), I can't test it at the Internet but I think it's working.
Image img = ImageIO.read(getClass().getClassLoader().getResource("FILE")); //that is the URL