[6340] in java-interest

home help back first fref pref prev next nref lref last post

File Security Exceptions in Java

daemon@ATHENA.MIT.EDU (Alan Masters)
Fri Mar 29 15:48:14 1996

Date:         Mon, 18 Mar 1996 20:57:51 +0000
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: Alan Masters <arm@MAG-NET.CO.UK>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>

Please could you help ?

I am attempting to develop an application that reads and writes to a database
on a locally networked Sun server.

I have executed code including the following snippet, using the JDK 1.0
appletviewer, as Netscape Navigator 2.0 does not produce any apparent result


Produces file dialogue box }    FileDialog fd = new FileDialog ( this, "FD" );
                           }    fd.show ();

Shows selected directory   }    string = fd.getFile ();
and file                   }    System.out.println ( string );
                           }    string = fd.getDirectory ();
                           }    System.out.println ( string );

                                File dir = new File ( string );
Produces the exception     }    if ( dir.exists () )
message below              }    {
                                        System.out.println ("Dir exists");
                                }


    *** Security Exception: file.read:/home/amast/Java/experiment/ ***
    sun.applet.AppletSecurityException: security.file.read:
      /home/amast/Java/experiment/
        at sun.applet.AppletSecurity.checkRead(AppletSecurity.java:266)
        at sun.applet.AppletSecurity.checkRead(AppletSecurity.java:237)
        at java.io.File.exists(File.java)


I suspect that it is a Systems Administration issue, and would be grateful if
anybody could refer me to some on-line documentation describing what might
be required,
so that I could pass this on to the Systems team.

        Many thanks,    Alan Masters.

-----
This message has been forwarded via the JAVA-INTEREST
mailing list.  In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).

-----
This message has been forwarded via the JAVA-INTEREST
mailing list.  In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).

home help back first fref pref prev next nref lref last post