forked from wesleyegberto/java-new-features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackagingTool.java
More file actions
22 lines (21 loc) · 701 Bytes
/
PackagingTool.java
File metadata and controls
22 lines (21 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import javax.swing.JOptionPane;
/**
* Steps:
*
* - compile: `javac PackagingTool.java`
* - create JAR: `jar -cfe packaging-tool-example.jar PackagingTool PackagingTool.class`
* - test JAR: `java -jar packaging-tool-example.jar`
* - create the Package: `jpackage --name pack-tool-sample --input . --main-jar packaging-tool-example.jar --main-class PackagingTool`
*
* Package will generate:
* - `dmg` on macOS
* - `msi` on Windows
* - `app` on Linux
*/
public class PackagingTool {
public static void main(String[] args) {
System.out.println("Main =)");
JOptionPane.showMessageDialog(null, "Hello world from self-contained application", null,
JOptionPane.INFORMATION_MESSAGE);
}
}