aspose file tools*
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
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30293
    
150

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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 ?