Creating an installer for Java desktop application

后端 未结 6 548
栀梦
栀梦 2020-12-12 16:31

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

6条回答
  •  天涯浪人
    2020-12-12 17:21

    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:

    • To create .exe bundle, it uses Wix
    • To create .msi bundle, it uses Inno

    All the details about Jpackage can be found at JEP 343: Packaging Tool.

提交回复
热议问题