# Re: Reading Files from an Applet

Marianne Mueller (mrm@Eng)
Thu, 8 May 1997 08:41:39 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jon Willard: "Question on javakey and java.security"
- Previous message: allan mays: "Cipher DES Key Question"
- Maybe in reply to: Cyrille Fauvel: "Reading Files from an Applet"

    Date: Thu, 8 May 1997 08:41:39 -0700

    Message-Id: <199705081541.IAA09403@puffin.eng.sun.com>

    From: Marianne Mueller <mrm@Eng>

    To: cyrille@autodesk.com

    Subject: Re: Reading Files from an Applet

Downloaded applets, by default, are subject to the controls of the
Applet Security Manager. One of the things that downloaded applets
cannot do is read and write local files.

In HotJava, downloaded applets can do this if the hotjava properties
file is correctly set up. The SFAQ has examples
(http://java.sun.com/sfaq)

Other browsers don't have provisions for downloaded applets to read
files, so this doesn't work on (for example) Netscape Navigator 3.x
for downloaded applets.

If the applet is installed *locally*, meaning that it is installed in
a directory on your CLASSPATH, it is not subject to the restrictions
of the Applet Security Manager, and it will be able to read and write
files. This is obviously awkward and doesn't help you if you want to
ship the applet around to other sites and have the applet read and
write files, but it's the only simple workaround.

In the future people will be able to set up their own policies for
whether or not applets can read/write particular files, based on
digital signatures. That's a big topic and I won't attempt to
explain the whole thing right here, but suffice to say that it will be
in the next major JDK release which is set for early access release in
summer 1997.

Marianne

- Next message: Jon Willard: "Question on javakey and java.security"
- Previous message: allan mays: "Cipher DES Key Question"
- Maybe in reply to: Cyrille Fauvel: "Reading Files from an Applet"