DEV Community


Discussion on: How can I make my Jar file executable on all computers?

jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄

That's not so simple actually
Big applications like Android Studio or IntelliJ just includes their own copy of the JRE inside the app.

I googled a bit for you and found this

and also this

GitHub logo fvarrui / JavaPackager

πŸ“¦ Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.


Maven Central

JavaPackager is a hybrid plugin for Maven and Gradle which provides an easy way to package Java applications in native Windows, Mac OS X or GNU/Linux executables, and generate installers for them.

SNAPSHOT version is not released to Maven Central, so you have to install it manually.

πŸ‘€ See JavaPackager changes and fixes.


It was born while teaching to my students how to build and distribute their Java apps, and after seeing that a chain of several plugins was needed to achieve this task, I decided to develop a plugin πŸ’ to govern them all.

How to use this plugin

Package your app with Maven

Add the following plugin tag to your pom.xml:

Enter fullscreen mode Exit fullscreen mode
baenencalin profile image
Calin Baenen Author

I know how to do the second to last one, but how do I do the second one?
Section 5.5 of the linked Oracle documentation.