wood burning stoves 2.0
The moose likes Applets and the fly likes How to download a text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "How to download a text file" Watch "How to download a text file" New topic

How to download a text file

nisha Sham

Joined: Jun 12, 2002
Posts: 19
I want to download a text file in my local web server to the
given location in PC. Please help

Joe Ess

Joined: Oct 29, 2001
Posts: 9025

For security reasions, regular applets are forbidden from accessing the local file system so you will have to provide a digital signiture for your applet. Downloading the file is as easy as creating an instance of java.net.URL and saving the content using the IO streams (IO tutorial here).

[How To Ask Questions On JavaRanch]
Don't get me started about those stupid light bulbs.
subject: How to download a text file