I have a batch file runthis.bat
dir >dir.txt
If I double click on this, a text file is being created with name dir.txt
Now I have to run this batch file using JSP.
<%
Runtime run =Runtime.getRuntime();
run.exec("C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/try/runthis.bat");
out.println("SUCCESS");
%>
I'm getting the output SUCCESS on a webpage but this batch file is not running.
Whats might be the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…