Suppose I want to distribute a Java application.
Suppose I want to distribute it as a single executable. I could easily build a .jar with both the application and all its external dependencies in a single file (with some Ant hacking).
Now suppose I want to distribute it as an .exe file on Windows. That's easy enough, given the nice tools out there (such as Launch4j and the likes).
But suppose now that I also don't want to depend on the end user having the right JRE (or any JRE at all for that matter) installed. I want to distribute a JRE with my app, and my app should run on this JRE. It's easy enough to create a Windows installer executable, and embed a folder with all necessary JRE files in it. But then I'm distributing an installer and not a single-file app.
Is there a way to embed both the application, and a JRE, into an .exe file acting as the application launcher (and not as an installer)?
jre.exe is a legitimate file. This process is known as Java Runtime Environment. It belongs to Java(TM) Platform and was developed by Sun Microsystem. It is commonly stored in C:\Program files.
The JRE Installer is located on the Java SE Runtime Environment 9 Downloads page. In a browser, go to the Java SE Runtime Environment 9 Downloads page.
You cannot do without JRE.
Try to use Avian and ProGuard toolkits. Avian allows to embed lightweight virtual machine in you app. Linux, MacOS, Windows and iOS are supported. And ProGuard allows you to shrink large jar file to prepare to embed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With