Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create all containing windows executable from jlink image

I have a functioning jlink image (including a custom jre). It works fine. But for my use case i need to package all files of the jlink image into a single all containing executable (.exe).

I was able to generate an all containing .msi installer using jpackage of OpenJDK 14, which is not bad but not the solution needed.

Is there currently a way to package a jlink image into an windows executable, so that i can just run it without anything else needed?

like image 337
Jonas TM Avatar asked Nov 28 '25 07:11

Jonas TM


1 Answers

You can use Launch4j for creating a .exe file from your image. The generated .exe file works as a wrapper on and is not a single all containing executable, but you can use your jlink image plus this .exe in Inno setup or some other similar tools to create a single .exe installer. Note that Launch4j needs a jar file to create .exe file. But this jar file is never used and the jar file in the jlink image is used.

like image 160
Sara P Avatar answered Nov 30 '25 19:11

Sara P