Code:
try {
if ((new File("c:\\OFFER_LETTER_1.pdf")).exists()) {
Process p = Runtime
.getRuntime()
.exec("rundll32 url.dll,FileProtocolHandler c:\\OFFER_LETTER_1.pdf");
p.waitFor();
} else {
System.out.println("File is not exists");
}
System.out.println("Done");
Leave a comment: