Create Windows Installer for Java Programs

2019-01-08 09:42发布

I'm a Java beginner.

I already created a simple GUI application that display will "hello world" label.

But, how can I create an installer from .java or .jar for windows. Let's say that I have created a useful application and want to share it with my friends to install it in their PC without they need to know what is JRE, or how to download JRE.

9条回答
Ridiculous、
2楼-- · 2019-01-08 10:19

You can use Ant task tool with InnoSetup and Launch4j under Eclipse IDE to create a professional-looking Windows-based EXE installer for Java-based program: How to create an exe file in java

查看更多
迷人小祖宗
3楼-- · 2019-01-08 10:22
地球回转人心会变
4楼-- · 2019-01-08 10:23

You can use the install4j for the create exe file for jar file of java project and use the Inno Setup Compiler file for create the installer for the project. this ts Youtube vedio for the how to create the exe and installer

video for create the exe and installer

查看更多
Explosion°爆炸
5楼-- · 2019-01-08 10:26

I use a program called JSmooth. This turns java .jar files into executables. I then take those executable and create a installer using InstallShield. InstallShield allows you to create highly customizable installers. There is a free "Light Edition" that you can use. Very easy to do and very easy to add to build scripts.

查看更多
做自己的国王
6楼-- · 2019-01-08 10:33
  1. Install exe4j

    • This you will use to create a .exe file from a jar file
  2. Install inno setup compiler

    • This is used to create installer

An outdated but relevant video to guide you through https://www.youtube.com/watch?v=kSmhIunxVW4

查看更多
来,给爷笑一个
7楼-- · 2019-01-08 10:35

You can use WiX to create Windows Installer package. The package will include the JRE binaries and your compiled application (jar file). Upon installation, the installer unpacks your files to user's computer, creates shortcut that starts your application (app-path\jre\bin\javaw.exe -jar app-path\your-app.jar).

See notes on Redistributing the JRE and in README.

查看更多
登录 后发表回答