• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it possible to run *.bat files in an Applet?

 
Vani Prabakaran
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a bat file that launch an emulator. It works fine with Runtime.getRuntime().exec(..) in an application. I tried the same thing in an Applet and I am getting IOException with createprocess error=0.
Is it possible to run a bat file in an applet? If yes, please give me some guidelines.
Thanks
Vani
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vani,
This will work only if the applet is signed... trying to execute programs on the clients machine is a big security risk so Java doesn't allow it. What if the batch file contained the command "format C:\" or something...
HTH,
-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!