This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

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 ?
 
Similar Threads
can u help me out
its urgent
Executing .exe inside a jar file
Running a JAR file from a java program
java applications as executable jars vs exe files.