Calling exe in jsp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tojimathew
    New Member
    • Sep 2006
    • 2

    Calling exe in jsp

    am using tomcat and jdk 2.0
    i need to call an exe file from my jsp page. i've tried the Runtime class and exec("calc.exe" ). but it is not working anyone can help?
    thnx in advance
  • supriya
    New Member
    • Sep 2005
    • 2

    #2
    how to call vb exe from java & how to pass arguments to it?

    Comment

    • PLA
      New Member
      • Aug 2006
      • 44

      #3
      Originally posted by supriya
      how to call vb exe from java & how to pass arguments to it?
      I'm not sure of what you want to do: Do you want the exe running on the server (that's where the JSP is running), or on the client (your JSP is now HTML)?

      Comment

      • Manjunath More
        New Member
        • Jul 2007
        • 1

        #4
        Originally posted by tojimathew
        am using tomcat and jdk 2.0
        i need to call an exe file from my jsp page. i've tried the Runtime class and exec("calc.exe" ). but it is not working anyone can help?
        thnx in advance
        This program will help you to call any exe from java program

        import java.io.*;

        public class LoadExe{
        public void RunTest()
        {
        Runtime r=Runtime.getRu ntime();
        Process p=null;
        try
        {
        String s="c:\\windows\ \explorer.exe";
        p=r.exec(s);
        }
        catch(Exception e){
        System.out.prin tln("error==="+ e.getMessage()) ;
        e.printStackTra ce();
        }
        }
        }


        From,
        Manjunath More
        C-DAC
        Kolhapur.

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by Manjunath More
          This program will help you to call any exe from java program

          import java.io.*;

          public class LoadExe{
          public void RunTest()
          {
          Runtime r=Runtime.getRu ntime();
          Process p=null;
          try
          {
          String s="c:\\windows\ \explorer.exe";
          p=r.exec(s);
          }
          catch(Exception e){
          System.out.prin tln("error==="+ e.getMessage()) ;
          e.printStackTra ce();
          }
          }
          }


          From,
          Manjunath More
          C-DAC
          Kolhapur.
          You mean it will call explorer on windows OS?
          And remember to use code tags when posting code.

          Comment

          • madhoriya22
            Contributor
            • Jul 2007
            • 251

            #6
            Originally posted by Manjunath More
            This program will help you to call any exe from java program

            import java.io.*;

            public class LoadExe{
            public void RunTest()
            {
            Runtime r=Runtime.getRu ntime();
            Process p=null;
            try
            {
            String s="c:\\windows\ \explorer.exe";
            p=r.exec(s);
            }
            catch(Exception e){
            System.out.prin tln("error==="+ e.getMessage()) ;
            e.printStackTra ce();
            }
            }
            }


            From,
            Manjunath More
            C-DAC
            Kolhapur.
            Hi,
            Your program is openin My Documents folder. Its not running IE.(I think it should do that)...Is it meant for openin My Documents folder?

            Thanks and regards,
            madhoriya

            Comment

            Working...