Results 1 to 9 of 9

Thread: access denied

  1. #1
    Dennis's Avatar
    Dennis is offline Member
    Join Date
    May 2010
    Posts
    83
    Rep Power
    0

    Default access denied

    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?

    Thanks,
    Dennis

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    When you get errors, please copy and paste the full text of the message.

    What versions of Java and Firefox are you working with?

  3. #3
    Dennis's Avatar
    Dennis is offline Member
    Join Date
    May 2010
    Posts
    83
    Rep Power
    0

    Default

    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)

  4. #4
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    applets cant access the file system
    you have to sign them i think

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    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.

  6. #6
    Dennis's Avatar
    Dennis is offline Member
    Join Date
    May 2010
    Posts
    83
    Rep Power
    0

    Default

    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

  7. #7
    curmudgeon is offline Senior Member
    Join Date
    May 2010
    Posts
    436
    Rep Power
    5

    Default

    Quote Originally Posted by Dennis View Post
    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.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    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?

  9. #9
    Dennis's Avatar
    Dennis is offline Member
    Join Date
    May 2010
    Posts
    83
    Rep Power
    0

    Default

    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.

    Java Code:
    Image img = ImageIO.read(getClass().getClassLoader().getResource("FILE")); //that is the URL
    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.

Similar Threads

  1. Replies: 22
    Last Post: 04-09-2011, 04:59 AM
  2. Replies: 6
    Last Post: 02-10-2011, 09:55 AM
  3. [SOLVED] Access Denied error using FileInputStream
    By xcallmejudasx in forum New To Java
    Replies: 8
    Last Post: 05-21-2009, 04:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •