Re: Can't read file when called from Applet?

From: Nigel Wade (nmw_at_ion.le.ac.uk)
Date: 06/30/04


Date: Wed, 30 Jun 2004 10:13:37 +0100

On Tue, 29 Jun 2004 15:07:02 -0500, Kalid wrote:

> "Nigel Wade" <nmw@ion.le.ac.uk> wrote in message
> news:pan.2004.06.29.09.58.06.962129@ion.le.ac.uk...
>> If it's sg.getSyllable() which isn't working it might help if you gave
>> us some clue as to what it does, and how it does it. I'd guess that
>> somewhere in that code it's throwing an exception which you have caught
>> and not dealt with correctly.
>
> sg.getSyllable() is a method in another class which is used by the
> applet. Here's the code:
>

[snip]
>
> fr1 = new FileReader("vowels.txt");

Applets cannot read the local filesystem unless they are signed. Even if
they could, where do you think the applet would look to read that file?

[snip}
> } catch (Exception e) {System.out.println(e);}

I think if you'd taken the trouble to look at the Java Console you would
have seen why it wasn't working.

-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK 
E-mail :    nmw@ion.le.ac.uk 
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555


Relevant Pages

  • Re: applet errors with mirror, up2date correct
    ... > The applet has been unable to access the following information sources ... > Does anyone have a clue what might be wrong? ... Your version of RHN applet doesn't work with FTP sources. ...
    (Fedora)
  • Re: Null pointer with image
    ... K is the label attached to the network drive that is mne. ... proper directory structure to the particular file. ... That refers to a local file on the client, the applet cannot access this. ... University of Leicester, Leicester, LE1 7RH, UK ...
    (comp.lang.java.programmer)
  • Re: [opensuse] Disabling updater applet
    ... > updates pending to not even start. ... Wouldn't it be just as easy to ask the devs to modify the applet so that it won't ... updater or by the dev kinda like the vboxuser has to be set in order to run virtual ...
    (SuSE)
  • Re: [opensuse] Disabling updater applet
    ... Wouldn't it be just as easy to ask the devs to modify the applet so that it won't ... updater or by the dev kinda like the vboxuser has to be set in order to run virtual ... The permission handling between the updater applet and the PackageKit daemon is actually ...
    (SuSE)
  • Re: problem with applet access to web service
    ... When applet is launched as standalone application it works ... Look in the Java console for your browser to see if there are any ... University of Leicester, Leicester, LE1 7RH, UK ... trying to access resources which it is not allowed to access. ...
    (comp.lang.java.help)