0

I am using below code to open url and download something from this url. After that downloaded file should be save in my path mentioned in second parameter.But by this code when i perform download, the download file saved on browser default setting path. How to save download file to my own path.

 Program.launch(url,my path);
James Z
  • 12,209
  • 10
  • 24
  • 44
Biswabir
  • 19
  • 8

1 Answers1

0

org.eclispe.swt.Program.launch(url,path) opens the default operating system executable associated with the url (the browser in your configuration). The second parameter is the working directory for the executable and has nothing to do with the download directory of your browser.

If you only want to download something from an url please look at how-to-download-and-save-a-file-from-internet-using-java.

Guido
  • 68
  • 6