请问用java如何启动有界面的windows进程? Runtime类的exec()启动进程后,在任务管理器中有该进程,但是没有出现该进程的界面。希望大家指教,谢谢!

解决方案 »

  1.   

    lz,什么叫没有该进程的界面啊?我用 Runtime的exec()可以启动千千静听,能正常使用.是不是你的windows程序有错误?
      

  2.   

    try{
    String username =(String)session.getAttribute("user_name");
    String passwd = request.getParameter("password");


    Runtime     runtime     =     Runtime.getRuntime();       
    runtime.exec("c:\\SendUdp.exe "+username+" "+passwd+" ");
    }catch(Exception e){
    //提示加载聊天程序出错
    out.print("<script>alert('加载聊天程序出错!');</script>");
    }