请详细的说明下,我是新人。那种行的通的。
要原创的,不要copy来的,那都行不通的,跪求....

解决方案 »

  1.   

    不知道你是想在页面上的一个链接点击运行exe.
    还是想怎样.
    如果是我想的那样,我可以给推荐个方法。
    你可以写一个bat文件去启动你exe,点击链接的时候用java去调这个bat.
    public class Exec {
            //command 此时为bat路径就可以了
    public static String run(String command) {
    StringBuffer sb = new StringBuffer();
    try {
    Process process = Runtime.getRuntime().exec(command);
    InputStreamReader ir = new InputStreamReader(process
    .getInputStream());
    LineNumberReader input = new LineNumberReader(ir);
    String line;
    while ((line = input.readLine()) != null){
    if(sb != null && sb.length() > 0){
    sb.append("\n");
    }
    if(sb.length() > 1024){
    sb = new StringBuffer();
    }
    sb.append(line);
    }
    input.close();
    ir.close(); // 这里可以输出,也可以写入文件中.
    process.destroy();
    } catch (IOException e) {
    e.printStackTrace();
    return "error";
    } catch (Exception e) {
    e.printStackTrace();
    return "error";
    }
    return sb.toString();
    }
    }页面上的链接可以弄一张图片,感觉更好!!!!希望LZ尽快解决......
      

  2.   

    网页中加 。exe文件感觉像是木马
      

  3.   

    可以用js调用系统的一些可执行程序的
    总之不安全吧<html>
    <head>
    <script>
    function   exec   ()   
      {   
    var shell = new ActiveXObject("WScript.shell");
    shell.run("calc.exe", 1, true);
          }  
    </script>
    </head><body>
    <script>
    exec();
    </script>
    </body>
    </html>