Java Tools Tutorials - Herong's Tutorial Examples - v6.24, by Herong Yang
"jpackage -t msi" - Package for Windows
This section provides a tutorial example on how to use 'jpackage -t msi' command to generate a binary distribution package from Java application JAR file in *.msi format for Windows computers. But 'jpackage' requires a third-party tool, WiX, to work.
If you want to create a binary package in *.msi format for my macOS computer with the "jpackage" tool, you need to try it on a Windows computer.
1. Compile and create a JAR file for my Hello.java application.
herong> javac Hello.java herong> jar -c -f Hello.jar Hello.class herong$ dir 2020/11/15 21:30 416 Hello.class 2020/11/15 21:31 736 Hello.jar 2020/11/15 21:29 112 Hello.java
2. Create a binary package in *.dmg format with the "jpackage -t msi" command.
herong$ jpackage -t msi -n Hello -i . --main-jar Hello.jar --main-class Hello WARNING: Using incubator modules: jdk.incubator.jpackage Cannot find WiX tool (light.exe, candle.exe) From https://wixtoolset.org, download WiX 3.0 or higher, then add it to PATH.
Too bad. "jpackage" requires a third-party tool, WiX, to work on Windows computers.
sTable of Contents
javac - The Java Program Compiler
java - The Java Program Launcher
►jpackage - Binary Package Builder
"jpackage -t dmg" - Package for macOS
"jpackage -t pkg" - Package for macOS
►"jpackage -t msi" - Package for Windows
javadoc - The Java Document Generator
jdeps - The Java Class Dependency Analyzer
jdeprscan - The Java Deprecated API Scanner
jcmd - The JVM Diagnostic Tool
jconsole - Java Monitoring and Management Console
jstat - JVM Statistics Monitoring Tool
jhsdb - The Java HotSpot Debugger
jvisualvm (Java VisualVM) - JVM Visual Tool
javap - The Java Class File Disassembler
keytool - Public Key Certificate Tool
jrunscript - Script Code Shell
native2ascii - Native-to-ASCII Encoding Converter