Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Execute a .exe file stored in jar file ?

 
Sam Zou
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wonder if this is possible.
I have a .exe file that have to be execute by my java application.
I'd like to store that .exe file in the jar file of the application.

How can I execute that .exe file from the java application ?


Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34686
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,
You need to unzip the jar file before running the program. You can have a java program take care of both steps through Runtime.exec().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic