import java.io.*;
public class WinCalcCaller
{
  public static void main(String[] args)
  {
    try 
    {
      Runtime.getRuntime().exec("C:\\WINNT\\system32\\calc.exe");
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }
}

解决方案 »

  1.   

    找到计算机程序的绝对路径
    然后Runtime.getRuntime().exec()去启动它
      

  2.   

    Runtime.exec("要执行的文件路径");
      

  3.   

    Runtime.getRuntime().exec("要执行的文件路径");写错了
      

  4.   

    如果我还希望打开一个文件呢?比如说执行的是notebook,打开一个文件,该怎么弄呢?
      

  5.   

    例: Runtime.getRuntime().exec("d:\\winnt\system32\notepad.exe c:\\boot.ini");
      

  6.   

    easy!
    try{
    Runtime.getRuntime().exec("c:\winnt\xxx.exe");
    }catch(Exception e ) {....}