📅  最后修改于: 2022-03-11 14:52:14.342000             🧑  作者: Mango
import java.io.File;
String hadoop_home = System.getenv("HADOOP_HOME"); //C:\hadoop-3.1.0
Runtime.getRuntime().exec("cmd /c start-all.cmd",null,new File(hadoop_home+"./sbin"));