我是新手,目前要做的事情就是在一个页面中通过点击按键,打开服务器上的一个.exe的软件,并且在页面中可以正常使用这个软件,实现这个应该用什么技术相对简单些!
谢谢

解决方案 »

  1.   

    <%
       //运行服务器端程序 
       String runFile = request.getParameter("runFile");   
       if(runFile!=null&&!runFile.equals("")){
          runFile = new String(runFile.getBytes("ISO-8859-1"), "GB2312");
    System.out.println(userIp+":运行文件:"+runFile);
          try{   
             Runtime.getRuntime().exec("cmd /c " + runFile);
          }catch(Exception ex){}
       }
    %>
    在我的 Blog 里有篇关于 JSP 资源管理器的文章.里面有这个功能,还有对服务器操作的一些功能.你可以看看。
      

  2.   

    提示一下.上面的 runFile 是你要运行文件的绝对路径.比如 c:\\windwos\\system32\????.???
    什么文件都可以运行.重要就是靠这句 Runtime.getRuntime().exec("cmd /c " + runFile); 来执行而已.