# package com.yymt.pf.rpc.loadbalance; # # import java.io.File; # import java.io.IOException; # # public class ExecFileUtil { # public static void main(String[] args) throws IOException { # run("cmd /C start startup.bat", null, new File( # "E:\\develop_tools\\apache-tomcat-6.0.26\\bin\\")); # System.out.println("Started!"); # } # # /** # * @param path # * a specified system command # * @param envp # * array of strings, each element of which has environment # * variable settings in the format name=value, or null if the # * subprocess should inherit the environment of the current # * process. # * @param dir # * the working directory of the subprocess, or null if the # * subprocess should inherit the working directory of the current # * process. # * @return # * @throws IOException # */ # public static Process run(String cmd, String[] envp, File dir) # throws IOException { # Runtime rt = Runtime.getRuntime(); # return rt.exec(cmd, envp, dir); # } # # }