如何从 Java 调用用 PHP 编写的批处理文件


How to call a batch file that is written in PHP from Java?

我是Java新手。我想知道如何从 Java 调用用 PHP 编写的批处理文件。

这并不难:

try{
 Runtime.getRuntime().exec("cmd /c start (Here the path of your batch file)");
}catch(FileNotFoundException ex){
  ex.printStackTrace(); 
 }

这是Java的运行时机制。

再举一些例子。