Run Batch File Or Command From JSP
I have a simple JSP file, code is below. I'm trying to run a batch file that simply contains the line :
java -ss262144 -oss819200 -classpath Topics.jar Building
but having no luck. Any ideas?
<%@ page language="java" import="java.io.*" %>
<%
try {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("c:/test.bat");
out.print("<center><a href='javascript:history.go(-1)'>Return</a>");
}
catch(Exception e){e.printStackTrace();
out.print("no");
}
%>

