create a JAVA Standalone executable application to run on different platforms without any Installation

后端 未结 4 1492
北恋
北恋 2021-02-14 19:24

I have created a run time image for my Java application using jlink and I would like to be able to ship my app as an executable to different platforms.

Ideally, it woul

4条回答
  •  误落风尘
    2021-02-14 19:47

    You can make an installer that installs the JDK and the application. Make the application an exe by using something like Launch4j and for a Mac executable follow this tutorial by Oracle: Packaging a Java App for Distribution on a Mac and lastly: For Linux

    Minecraft uses this method and as far as that i don't know any other way.

    If you want to make portable application, "make once run anywhere" type app then I'd suggest trying out a different programming language like C# which also requires the .NET Runtime but is embedded in Windows systems whereas Java needs to be installed manually.

提交回复
热议问题