{"id":732,"date":"2019-11-21T20:33:14","date_gmt":"2019-11-21T20:33:14","guid":{"rendered":"https:\/\/jan.schnasse.org\/blog\/?p=732"},"modified":"2026-09-28T11:39:01","modified_gmt":"2026-09-28T09:39:01","slug":"jpackage-launch-java-apps-without-jvm","status":"publish","type":"post","link":"https:\/\/jan.schnasse.org\/blog\/2019\/11\/21\/jpackage-launch-java-apps-without-jvm\/","title":{"rendered":"JPackage &#8211; Launch Java Apps without JVM"},"content":{"rendered":"<p>The <a href=\"https:\/\/jdk.java.net\/jpackage\/\">jpackage<\/a> tool of Java 14 can be used to create platform specific packages of java apps.\u00a0 The app does not require a JVM to run.<\/p>\n<p>Example<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\/opt\/jdk-14\/bin\/jpackage --name etctoy --input target --main-jar etctoy.jar<\/pre>\n<p>The call is made from within a maven project. etctoy.jar is a fat-jar (size 6.6M) but the call should also work for regular jars with further dependencies in the target directory (see &#8211;input parameter).<\/p>\n<p>The result is a debian package that installs the app under \/opt\/etctoy<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sudo dpkg -i etctoy_1.0-1_amd64.deb<\/pre>\n<p>The installation uses 140M of disk space.<\/p>\n<p>To make the tool available via command line on should link the binary into \/usr\/bin<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sudo ln -s \/opt\/etctoy\/bin\/etctoy \/usr\/bin<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The jpackage tool of Java 14 can be used to create platform specific packages of java apps.\u00a0 The app does not require a JVM to run. Example \/opt\/jdk-14\/bin\/jpackage &#8211;name etctoy &#8211;input target &#8211;main-jar etctoy.jar The call is made from within a maven project. etctoy.jar is a fat-jar (size 6.6M) but the call should also work [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,6,9],"tags":[],"class_list":["post-732","post","type-post","status-publish","format-standard","hentry","category-admin","category-development","category-java"],"_links":{"self":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts\/732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/comments?post=732"}],"version-history":[{"count":1,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts\/732\/revisions"}],"predecessor-version":[{"id":4263,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/posts\/732\/revisions\/4263"}],"wp:attachment":[{"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/media?parent=732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/categories?post=732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jan.schnasse.org\/blog\/wp-json\/wp\/v2\/tags?post=732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}