try
{
Runtime.getRuntime().exec("test.exe","参数1","参数2","参数3","参数4");
}
catch(java.io.IOException ex)
{
System.err.println("ERROR: " + ex);
ex.printStackTrace(System.out);

}

解决方案 »

  1.   

    import java.util.*;
    try {
            //如果你自己的text.exe在C盘下面
            Process proc = Runtime.getRuntime().exec("c:\\test -B ### -C ### -E ###");
          catch(IOException ioError) {
            ioError.printStackTrace();
            System.exit(0);
          }
    第二个问题:可能要自己写一个小程序吧?
      

  2.   

    第二个问题:可以拖个FileOpen 控件吧!
    不会很难的!
    可惜我改学得非了,呵呵!
    惨!
      

  3.   

    如果有FileOpen这个控件的话,我还用问吗。不知那位老兄是否知道网上可有这类控件下载,忘告知,大恩不言谢了。
      

  4.   

    public class FileDialogextends Dialog The FileDialog class displays a dialog window from which the user can select a file. Since it is a modal dialog, when the application calls its show method to display the dialog, it blocks the rest of the application until the user has chosen a file.
      

  5.   

    try
    {
    Runtime.getRuntime().exec("test.exe","参数1","参数2","参数3","参数4");
    }
    catch(Exception ex)
    {

    }
      

  6.   

    Runtime.getRuntime().exec();
    呵呵,大家都知道了