Java 14 new features |Java Packaging Tool to create exe for install java application on windows
Step#1:
Create your project/required mail java class
Compile
Run to check if it is working fine
Step#2:
Create a executable jar file.
jar -cfe jpDemo3.jar org.java14.JPackDemo org/java14/*.class
Step#3:
Install Wix 3.0 or able and set to path.
Download wix from https://wixtoolset.org/.
Step#4:
Use JPackaging tool/Command line utility to create exe file
Command to create exe file:
jpackage --input . --name JPackageDemoApp --main-jar JPKGDemo.jar --main-class org.java14.JPackDemo --type exe --java-options '--enable-preview' --win-shortcut
Step#5:
Install your exe into ur window desktop/laptop
jpackage is a command-line tool to create native installers and packages for Java applications.
It's an incubating feature under the jdk.incubator.jpackage module.
3. Why jpackage?
It's standard practice while distributing software to deliver an installable package to the clients This package is compatible with the user's native platform and hides the internal dependencies and setup configurations. For example, we use DMG files on macOS and MSI/exe files on Windows.
This allows the distribution, installation, and uninstallation of the applications in a manner that's familiar to our end users.
jpackage allows developers to create such an installable package for their JAR files. The user doesn't have to explicitly copy the JAR file or even install Java to run the application. The installable package takes care of all of this.
#JavaBeam #PackagingToolInJava14 #JDK14NewFeatures #Java
Nesta página do site você pode assistir ao vídeo on-line Java 14 new features |Java Packaging Tool to create exe for install java application on windows duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Java Beam 27 Setembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 568 vezes e gostou 3 espectadores. Boa visualização!