The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Crapplets reading text files

Posted by Matt Gerrans on November 19, 2001 at 11:34 PM

> > > How do you read a text file using an applet?
> > You don't! That's the point of applets: they can't muck with your files. (If they could, they would be called "viruses" in most cases).
> > - MFG
> thats crap, unless the applet writes, then can it be considered hostile, not reading
> an example

Speaking of crap, did you actually try the example at the end of your URL? Try and compile it. Good luck.

Yes, an applet can read a text file, as long as it is on the server from which the applet is running. That's not completely useless, but close.

The original post didn't say what the location of the text file would be, but I assumed it was talking about opening files on the client machine. Of course, if you only read a file on the client machine, it would be a huge security problem, but not a virus problem. However, what I said was that applets don't allow you to muck with files [on the client machine], so you obiously didn't look up "muck" to understand what I meant, but English (along with civility) doesn't seem to be one of your strengths, anyway.

Anyhow, I don't know exactly what the orginal poster wanted, but if it is modifying files on the client machine, then a signed applet or application would be the solution, not an applet.

- mfg


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us