LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   using a small java program to download a web page (https://www.linuxquestions.org/questions/programming-9/using-a-small-java-program-to-download-a-web-page-55610/)

mrtwice 04-17-2003 09:58 PM

using a small java program to download a web page
 
I would like to be able to provide a program a string representing a URL and have that program go out to the INTERNET, grab the specified file, and save it locally to my hard drive. I am sure this is not very complicated but I am not sure where to start. My Java book didn't really cover it. Thanks in advance.

DavidPhillips 04-17-2003 10:28 PM

I'm not sure if this will be what you want, because it's not using java. I would use wget.

wget -r websiteurl


see this for details

man wget

JIV 04-17-2003 11:01 PM

if u want to study the code ...
i mean to know how to write a code in Java to get a file from web
then go "planet-source code "
search there otherwise i 'll give u the code

acjt 04-23-2003 07:44 AM

Start with the java.net packages. There's sure to be a chapter in your 'book'.


All times are GMT -5. The time now is 05:19 PM.