I have stupid problem.
My applet has parts of reading local files!
It is possible for my program to run with "appletviewer",
but It can not run on Netscape 4.5 PRE2.
I understand that applet in Java can not read or write files at all.
So, I made file, ~/.hotjava/properties and this file has following statement.
acl.read=/applet
( my *.class files, *.html and data files are in " ~/applet " directory )
When I started my applet on Netscape,
security exception that had following message occured!
netscape.security.AppletSecurityException: security.checkread: Codebase 'C:\applet\' does
not include 'test.dat'
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at java.lang.SecurityException.<init>(Compiled Code)
at netscape.security.AppletSecurityException.<init>(Compiled Code)
at netscape.security.AppletSecurityException.<init>(Compiled Code)
at netscape.security.AppletSecurity.checkRead(Compiled Code)
at netscape.security.AppletSecurity.checkRead(Compiled Code)
at java.lang.SecurityManager.checkRead(Compiled Code)
at java.io.FileInputStream.<init>(Compiled Code)
at INPUT_DATA.Read_File(Compiled Code)
at INPUT_DATA.paint(Compiled Code)
at java.awt.Component.dispatchEventImpl(Compiled Code)
* at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
What can I do to solve this problem?
I need your advice, please help me.
< My environment >
OS : Windows NT 4.0
JDK vol. : JDK1.1.7
browser : Netscape 4.5 Prerelease2
Thank you !!
_____________________
Yamauchi Koji
Parallel And Distributed Computing Lab. (Wada Lab)
College of Information Science
Third College
Tsukuba University
e-mail : koji@padc.mmpc.is.tsukuba.ac.jp
phone : +81 - 298 - 55 - 5386