I do have two questions where one would be solved after the first question.
1) I want to open simple URL in my company laptop with java but it does not let me open it. It gives connection timed out error. Would it be cause of the network settings that I need to make them in my java code also ? When I click the IE settings on LAN, there is no proxy settings but the configuration part is clicked and there is an adress http://wgate.company.entp.tgc:8080/wpad.dat . Please let me know what I need to do in java code.
My sample code
import java.net.*;
import java.io.*;
public class URLReader {
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://www.google.com/");
BufferedReader in = new BufferedReader(
new InputStreamReader(oracle.openStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
2) I do have a list of link pages to download Word files. I want to make a loop in java and I want java to go to these web pages and download files at once instead of me. Is there any special function or code to download a file in java ?
Thank you.
sample url I have
http://www.gooogle.com/attachments/change/TestCase_F257579.doc