This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Applets and the fly likes Opening files from applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Opening files from applet" Watch "Opening files from applet" New topic

Opening files from applet

dhanu sudha

Joined: Apr 16, 2002
Posts: 11
I have a doubt.
How to open a file from applet?
can anybody tell this?
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Do you mean a file on the user's computer or one from the server?

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Tim Eyre

Joined: May 20, 2002
Posts: 20
I am interested in a reply for this.
I realise there are security restrictions preventing you from opening files on the users computer, but I need my applet to read a list of questions from the server upon which it resides. I can see methods for reading audio clips and images, but none for plain files.
meera sood
Ranch Hand

Joined: Dec 18, 2001
Posts: 50
you can make a URL connection to the server and use a buffered reader to read from the file on the server.
i have the code...lemme know if you need it.
hope this helps.
Maki Jav
Ranch Hand

Joined: May 09, 2002
Posts: 439
meera Send me the code plz

Help gets you when you need it!
I agree. Here's the link:
subject: Opening files from applet
jQuery in Action, 3rd edition