Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to store an executable file for my Java application to call. I want to make this Java application into an executable on a disc and for the Executable file in the Java Program to be called elsewhere.

What I have tried:

I have tried to use Java to put my executable file into it as well as IDEs like Neteans and Eclipse IDE.
Posted
Updated 21-Aug-18 5:37am

1 solution

In all reality a JAR package is just a ZIP file, and you can directly embed just about any file type within it; such as your executable. What the real trick becomes is how to run that file.

Easy answer- read the executable from within your java application and write it as an executable file to the disc. You can then place a call to that copied file.

Sources:
Stack Overflow: Embedding Executable in Java Application[^]
Stack Overflow: Java Programming: call an exe from Java and passing parameter[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900