看看关于runtime的这段代码(50分)
在jsp中:
<% runBat.run("interfaceclass");%>
好像没有执行呀,哪里出错了。load.log文件里也没有东西,bat文件保证没问题
import java.io.*;
public class runBat
{
private String tname;
public void setTname(String tname)
{
this.tname = tname;
}
public void run(String tname)
{
try
{
Runtime.getRuntime().exec("cmd.exe /c echo ssssssss >>e:\\share\\etl\\load.log");
Runtime.getRuntime().exec("cmd.exe /c start e:\\share\\etl\\loadout_single.bat " + tname + " >>e:\\share\\etl\\clear.log");
Runtime.getRuntime().exec("cmd.exe /c start e:\\share\\etl\\loadin_single.bat " + tname + " >>e:\\share\\etl\\clear.log 2>&1");
}
catch(Exception e) { System.out.println(e.toString());}
}
}