This topic has been archived. It cannot be replied.
-
枫下家园 / 电脑用户 / 各位DX,紧急求救:怎样在servlet的 DOPOST() 中调用一个C的可执行文件?详情如下:
-yorkariel(yorkariel);
2002-6-6
{603}
(#560564@0)
-
up....
-yorkariel(yorkariel);
2002-6-8
(#566498@0)
-
Read here你得到的Runtime是运行 Tomcat 的JVM, Tomcat 的Default SecurityManager是不允许Spawn另一个Process的. 你需要一个Permission Class, 并重新 Configure Tomcat 的SecurityManager. 去Tomcat 的conf目录下,修改这个文件Tomcat.polity.
但是TOMCAT的SecurityManager没有经过严格测试,我建议你用JNI较好.
用C++写一个小程序调用Win32 API 的ShellExecute 去执行"c.exe". 你的Servlet 就可以通过JNI Call 你的 C++了.
-eggplant(老茄子);
2002-6-8
{388}
(#566586@0)