Results 1 to 5 of 5

Thread: Security with applet ?

  1. #1
    DaoK
    Guest

    Security with applet ?

    I got that message :

    java.security.AccessControlException: access denied (java.io.FilePermission d:\temp\classe1.java read)

    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)

    at java.security.AccessController.checkPermission(AccessController.java:401)

    at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)

    at java.lang.SecurityManager.checkRead(SecurityManager.java:887)

    at java.io.File.length(File.java:790)

    at applet1.actionOuvrirFichier(applet1.java:221)

    at applet1.actionLoginButton(applet1.java:209)

    at applet1.actionPerformed(applet1.java:202)

    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)

    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)

    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)

    at java.awt.Component.processMouseEvent(Component.java:5021)

    at java.awt.Component.processEvent(Component.java:4818)

    at java.awt.Container.processEvent(Container.java:1380)

    at java.awt.Component.dispatchEventImpl(Component.java:3526)

    at java.awt.Container.dispatchEventImpl(Container.java:1437)

    at java.awt.Component.dispatchEvent(Component.java:3367)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)

    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)

    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)

    at java.awt.Container.dispatchEventImpl(Container.java:1423)

    at java.awt.Component.dispatchEvent(Component.java:3367)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)

    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)



    ------------------------------------------------------

    Anyone can tell me how to solve that problem ? I have that only when in internet explorer, inside the JBuilder all is ok

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I didn't think you could do file I/O with applets. Is that where the error occurs?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    DaoK
    Guest
    I get that error when I push the button to open the file

  4. #4
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332

    Lightbulb

    i believe you are having a problem with the security manager. to prevent malicious applet for ****ing your computer, applets are restricted in their behaviour. what an applet can or canot do is determine by the "priveleges" (i trhink thats what it is called) an applet is awarded, you can probably give rights to the applet throguh some of the options in IE or something. JBuilder probably doesn't bother (ie. bypasses) with the security manager stuff b/c it assumes no moron would compile and run malicous code on their own box.
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  5. #5
    Addicted Member Mrs Kensington's Avatar
    Join Date
    Sep 2001
    Location
    Dorset, UK
    Posts
    144
    You need to look into digitally signing your JAR file.

    Sun's page here http://developer.java.sun.com/develo...n/signing.html
    Ford? Theres an infinite number of monkeys outside that want to talk to you about a script of hamlet they've produced!

Posting Permissions

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



Click Here to Expand Forum to Full Width