Java 14 new features |Java Packaging Tool to create exe for install java application on windows

Publié le: 27 septembre 2020
sur la chaîne: Java Beam
568
3

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


Sur cette page du site, vous pouvez voir la vidéo en ligne Java 14 new features |Java Packaging Tool to create exe for install java application on windows durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Java Beam 27 septembre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 568 fois et il a aimé 3 téléspectateurs. Bon visionnage!