[英]applet execution fail to execute batch file packaged inside executable jar
I am executing a bat file through my java program. 我正在通过Java程序执行bat文件。 the path is hardcoded in java.
路径是用Java硬编码的。
I have packaged bat file in the jar.and jar contains main class as an applet class. 我已经将bat文件打包在jar中。jar包含主类作为applet类。
i am calling this jar file from jsp page as applet. 我从jsp页面将此applet文件称为applet。
applet run successfully but couldn't run bat file inside init. 小程序成功运行,但无法在init中运行bat文件。
If i give hard coded path then it executes ...but can't execute taking from jar. 如果我给出了硬编码的路径,那么它将执行...但是无法执行从jar中获取。
Any hints for packaging such jar ie having a bat file inside and able to run it as dynamic applet? 是否有任何包装此类jar的提示,即在其中包含bat文件并能够将其作为动态applet运行?
You're trying to make two impossible things here: 您正在尝试在此处做出两项不可能的事情:
Applets run in a security sandbox. 小程序在安全沙箱中运行。 You need to learn about it.
您需要了解它。 Read http://download.oracle.com/javase/tutorial/deployment/applet/security.html
阅读http://download.oracle.com/javase/tutorial/deployment/applet/security.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.