File myFile =new File( "config/JPR.pdf" ); try { Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + myfile); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }