my dog learned polymorphism
The moose likes Beginning Java and the fly likes How to Execute a .exe file stored in jar file ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to Execute a .exe file stored in jar file ?" Watch "How to Execute a .exe file stored in jar file ?" New topic
Author

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

Sam Zou
Ranch Hand

Joined: Nov 18, 2002
Posts: 40
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


Sam<p>"Life is difficult"<br /> -Scott Peck-</p>
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32636
    
216

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().


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Execute a .exe file stored in jar file ?
 
It's not a secret anymore!