# Re: Applets and RandomAccessfile

Charlie Lai (Charlie.Lai@Eng)
Fri, 17 Oct 1997 10:35:00 -0800 (PDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Charlie Lai: "Re: Corrupt jar file"
- Previous message: Charlie Lai: "Re: Javakey Support"
- In reply to: Peyrache Julien: "Applets and RandomAccessfile"

    From: Charlie.Lai@Eng (Charlie Lai)

    Message-Id: <199710171735.KAA09852@angeles.eng.sun.com>

    Subject: Re: Applets and RandomAccessfile

    To: jpeyrach@mygale.org (Peyrache Julien)

    Date: Fri, 17 Oct 1997 10:35:00 -0800 (PDT)

    In-Reply-To: <199710171233.OAA22194@cheylard.inforoutes-ardeche.fr> from "Peyrache Julien" at Oct 17, 97 02:35:57 pm

hi,

> My problem is as followed :
>
> I've made an application which consists in writing and reading a file
> but when i want to transform it into an applet the randomaccessfile
> object (the file.read method) causes an exception like that
>
> *** Security Exception: file.read:belges.txt ***
> sun.applet.AppletSecurityException: security.file.read: belges.txt
> at sun.applet.AppletSecurity.checkRead(AppletSecurity.java:269)
> at sun.applet.AppletSecurity.checkRead(AppletSecurity.java:243)
> at java.io.RandomAccessFile.<init>(RandomAccessFile.java:48)
> at fenetre.action(fenetre.java:110)
> at java.awt.Component.handleEvent(Component.java:916)
> at java.awt.Component.postEvent(Component.java:844)
> at java.awt.Component.postEvent(Component.java:861)
> at sun.awt.win32.MButtonPeer.action(MButtonPeer.java:39)
> at sun.awt.win32.MToolkit.run(MToolkit.java:66)
> at java.lang.Thread.run(Thread.java:294)=20

to allow applets to read/write files using appletviewer:
http://java.sun.com/sfaq/
you may also sign the applet to achieve the same goal:
http://java.sun.com/security/signExample/

charlie

- Next message: Charlie Lai: "Re: Corrupt jar file"
- Previous message: Charlie Lai: "Re: Javakey Support"
- In reply to: Peyrache Julien: "Applets and RandomAccessfile"