import java.lang.Runtime;
public class test
{ public static void main(String[] args)
                {
                 Runtime r =Runtime.getRuntime();
                 Process p = null;
                 
                try{
                    p=r.exec("command.exe /c your_command"); //1
                    //if you use win2k or nt please use"cmd.exe /c your_command"
                    p.waitFor(); //2
                    }
                    catch(Exception e)
                         {
                          e.printStackTrace();                         }
                  }
}