I know this question has been asked many a times and all the time there is an answer which says about using an executable jar or making an .exe using launch4j or similar app
If you are on JDK 13 or above, you can package any Java program along with its runtime by using the default packaging tool in the JDK called Jpackage
. This can inherently create installers for Linux, Mac and Windows operating system.
An EA of the tool is already available as a part of the JDK.
You can create a specific runtime by using jlink.
Jpackage needs some 3rd party free software for creating Windows bundles:
.exe
bundle, it uses Wix.msi
bundle, it uses InnoAll the details about Jpackage can be found at JEP 343: Packaging Tool.