xiaolie,你好,我执行你刚才所告诉的在JSP中调用exe的方法后,出现以下提示,麻烦你进来帮我看看。谢谢!

Hothehe 2002-05-17 12:27:39
我的代码:
<%
String command = "PrjControlCenter.exe";
Runtime rt = Runtime.getRuntime();
rt.exec(command);
%>

页面提示错误:
java.io.IOException: CreateProcess: PrjControlCenter.exe error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:63)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:550)
at java.lang.Runtime.exec(Runtime.java:416)
at java.lang.Runtime.exec(Runtime.java:358)
at java.lang.Runtime.exec(Runtime.java:322)
at _j._exe._exe__jsp._jspService(/j/exe/exe.jsp:8)
at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
at com.caucho.jsp.Page.service(Page.java:474)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:166)
at com.caucho.server.http.Invocation.service(Invocation.java:277)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:536)

...全文
7 点赞 收藏 2
写回复
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Hothehe 2002-05-17
请问该如何改正呢?谢谢!
回复
pmaster 2002-05-17
错在语法!
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告