Hi Jeff,
There could be a number of reasons why a security exception is being thrown... Since you're using a FileReader object, which I believe can only read local files, I assume that both your browser and your file (that the applet is trying to access) reside on the same Mac OS X server? If that's the case, then I'm afraid that you're right about the security issue. It wouldn't matter that the applet is being loaded "locally"; it would still be treated as an untrusted downloaded applet without local I/O privileges, at least in pure Java 1 (JDK 1.1.x).
However, there might be a way to work around this if your Mac OS X user account normally has read-permission for that file. For instance, perhaps you could try specifying the applet's CODE= tag as a local path instead of a 'file://' URL, and also adding its classes to the global class-path of the active JVM?
If that doesn't work, then you could try a browser-specific approach, as a long shot. I guess you're using the new "carbonised" version of MS Internet Explorer for Mac OS X? I myself haven't used that IE yet (or Mac OS X much, for that matter). However, if it's similar to recent versions of IE for Mac OS Classic, then it should allow selecting Apple's MRJ Java Virtual Machine (JVM) instead of MS' JVM in the Java panel of the Preferences dialogue. If so, the MRJ security options would then appear, and you might be able to use them to control an applet's access to local and/or remote files. E.g., unchecking the 'Restrict Access to Non-Java class files' option would supposedly allow an applet to access local files other than Java sources/archives. (Although, I'm not certain how these options tie into the pure Java 1 model.)
If that doesn't make any difference either, or if my assumptions about your setup are completely wrong, then there are some other approaches that might work. E.g., you could switch to accessing your file remotely via a URLConnection object rather than a FileReader one. Or, if Mac OS X PB comes with Java 2 (JDK 1.2+) instead of or along with Java 1, then you could probably use the new Java 2 security API to let your applet have "local" I/O privileges, just for your testing phase...
[BTW, in case you haven't already seen them, there are some useful Java FAQs listed at the
Java FAQ Archives website.]
Regards,
--Paul
[This message has been edited by Paul Crawford (edited 03-08-2001).]