DEV Community

loading...

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

Collapse
baenencalin profile image
Calin Baenen Author

How do I "bundle a JRE with it"? Also, what does "SO" in this case (StackOverflow)?

Collapse
patarapolw profile image
Pacharapol Withayasakpunt

My process was to use Gradle to create shadow JAR. Maven also has a different plugin to create a fat JAR, I believe.

About bundling a JAR file, would you rather want users to install JRE? If not, which OS do you want to try first (which one are you running)?

Thread Thread
baenencalin profile image
Calin Baenen Author

In regards to the second to last question, it'd be fine, as long as the user can run the Jar, but I'm not familiar with any tools, so I want to know if there are any simple tools (for dumbasses like me). :p
Though, if it helps find anything, I'm using Windows 10.

Thread Thread
patarapolw profile image
Pacharapol Withayasakpunt • Edited

If you use no build tools, just pure javacand java -jar, it should already be fat JAR by default, I believe.

Thread Thread
baenencalin profile image
Calin Baenen Author

Well, it doesn't work on other computers, so, are there any settings I need to apply?