Results 1 to 3 of 3
  1. #1
    Reskaillev is offline Member
    Join Date
    Jul 2011
    Posts
    53
    Rep Power
    0

    Default io.filepermission: acces denied

    Hi everyone,

    Im having this problem where I can't seem to be able to "read" images in JPanels and Jbuttons
    because they don't seem to have permission to "read" the image.

    Did some research but found nothing...

    here are the error messages:

    Java Code:
    Java Plug-in 1.7.0
    Using JRE version 1.7.0-ea-b119 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Pete Ravenshard
    
    ----------------------------------------------------
    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
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment 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" "activeIcon.gif" "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 CustomButton.<init>(CustomButton.java:37)
    	at MenuPanel.AddAButton(MenuPanel.java:45)
    	at MenuPanel.<init>(MenuPanel.java:33)
    	at MaraudersOfDeepSpace.init(maraudersofdeepspace.java:27)
    	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "activeIcon.gif" "read")
    A second one, after removing the activeIcon.gif image (it was an animated gif and I though
    maybe the fault would be animation related):

    Java Code:
    Java Plug-in 1.7.0
    Using JRE version 1.7.0-ea-b119 Java HotSpot(TM) Client VM
    User home directory = C:\Users\Pete Ravenshard
    
    ----------------------------------------------------
    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
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment 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" "Earth.png" "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 java.io.File.canRead(Unknown Source)
    	at javax.imageio.ImageIO.read(Unknown Source)
    	at MenuPanel.<init>(MenuPanel.java:35)
    	at MaraudersOfDeepSpace.init(MaraudersOfDeepSpace.java:33)
    	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "Earth.png" "read")
    Thnx in advance,

    Resk

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: io.filepermission: acces denied

    Assuming this is an Applet or Webstart app (which is important information), see the following which applies to both:
    What Applets Can and Cannot Do (The Java™ Tutorials > Deployment > Java Applets)

  3. #3
    Reskaillev is offline Member
    Join Date
    Jul 2011
    Posts
    53
    Rep Power
    0

    Default Re: io.filepermission: acces denied

    Srry Indeed I forgot to mention that im dealing with an applet here...

    Ok it seems I need to make my unsigned applet a signed applet
    And do it as described in this link:

    http://java.sun.com/developer/online...ok/signed.html

    is this correct?
    Last edited by Reskaillev; 09-29-2011 at 09:35 PM.

Similar Threads

  1. Filter is blocking acces to servlet
    By NatureFreshMilk in forum Java Servlet
    Replies: 0
    Last Post: 09-29-2011, 01:48 PM
  2. wan acces to web app during sendredirect local server name
    By ppo in forum JavaServer Pages (JSP) and JSTL
    Replies: 6
    Last Post: 04-06-2010, 05:31 PM
  3. Invalid thread acces Execption
    By Big Pete in forum SWT / JFace
    Replies: 1
    Last Post: 08-02-2009, 12:19 PM
  4. Java Client Needs Database Acces Over Internet
    By etherkye in forum Networking
    Replies: 2
    Last Post: 07-01-2009, 10:44 AM
  5. How to allow one user to acces resource
    By SantoshBK09 in forum Advanced Java
    Replies: 1
    Last Post: 01-06-2009, 03:11 PM

Posting Permissions

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