Hello,
I am trying to implement a program which, among other things, will have to download automatically a number of pdf files I have found using Google. Instead of building something from scratch, I assumed that I could invoke the Linux wget:
String commandString="wget
http://www.google.com";
try {
Process process = Runtime.getRuntime().exec(commandString);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
The problem is that I get nothing in the program's folder. Null. Void! i tried also to play a bit with wget's parameters, such as masking the user agent (-U mozilla), setting download limit, etc but still I get nothing downloaded. The command works perfectly from the shell, by the way.
Do you have any ideas what I am doing wrong?