Runtime rt = Runtime.getRuntime.exec(" 程序名字和路径")

解决方案 »

  1.   

    除了exec(String command) exec(String[] cmdarray) 
    exec(String[] cmdarray, String[] envp)
    exec(String[] cmdarray, String[] envp, File dir) 
              
    有没有对其运行时的参数的接受,比如Rutime.exe("cmd /c dir")中的"/c"等参数的用法的介绍
      

  2.   

    amato():你的问题有点奇怪,对Runtime.exe来说,它的参数就是命令字符串,而/c 是windows 下"cmd" 命令的参数,即:你所要运行的命令的参数。就像在unix下,你用"ls -l"中的“-l"一样。 如果是这样的话,你应该看windows的帮助或命令解释。