2015-06-08 110 views

回答

0

如果文件下載位置默認爲某個位置。

您可以使用以下方法進行交叉檢查。

File f = new File("PathToFileorDirectory"); 
if (f.exists()) { 
    Process p = Runtime 
      .getRuntime() 
      .exec("rundll32 url.dll,FileProtocolHandler "path of PDF file""); 
    p.waitFor(); 
    } 
else 
system.out.println("File does not Exist"); 
相關問題