Runtime.getRuntime().exec(
   new String[] {"c:/program files/microsoft office/outlook.exe});

解决方案 »

  1.   

    Runtime r=Runtime.getRuntime();
      Process p=null;
      try
      {
        p=r.exec("c:/program files/microsoft office/outlook.exe");
      }
      catch(Exception ex)
      {
        System.out.println("fffff");
      }
      

  2.   

    不用插入任何包,因为Runtime属于java.lang.*下
    试一试这个
    public class joss
    {
     public static void main(String args[])
     {
      Runtime r=Runtime.getRuntime();
      Process p=null;
      try
      {
        p=r.exec("notepad");
      }
      catch(Exception ex)
      {
        System.out.println("fffff");
      }
     }
    }
      

  3.   

    Runtime r=Runtime.getRuntime();
      Process p=null;
      try
      {
        p=r.exec("c:/program files/microsoft office/outlook.exe");
      }
      catch(Exception ex)
      {
        System.out.println("fffff");
      }
    it's wrong
    Runtime r=Runtime.getRuntime();
      Process p=null;
      try
      {
        p=r.exec("c://program files//microsoft office//outlook.exe");
      }
      catch(Exception ex)
      {
        System.out.println("fffff");
      }