I am doing a java web project using tomcat server. So far I have used the tomcat server that is provided with Netbeans IDE. I am using the following code to open a pdf file in my project.
public int printPDF(String filePath){
    try {
        if ((new File(filePath)).exists()) {
            Process p = Runtime
               .getRuntime()
               .exec("rundll32 url.dll,FileProtocolHandler " + filePath);
            p.waitFor();
            return 1;
        } 
        else {
            //System.out.println("File is not exists");
            return 0;
        }
        //System.out.println("Done");
  } catch (Exception ex) {
    ex.printStackTrace();
            return 2;
  }
}
Then I published my web site in another machine(client's). I used a tomcat server installer to install tomcat serve in that machine. But when I host my web site there all the other functions except the above one is working perfectly. I have no idea where it goes wrong. Then I installed the same server in my machine and the exact thing happened. Is there anything I should know when I install Tomcat server using a exe file rather than working with the server that is given by Netbeans IDE. Thank you.
 
    