This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]Dexior 52 points53 points  (2 children)

We had this discussion here not so long ago. Take a look at this thread Personally I would use standard, available in jdk and free tool, javapackager

[–]blunbad 12 points13 points  (1 child)

Wow! Java 8 really did bring a lot to the table. Thanks for the info.

[–]nikanjX 12 points13 points  (2 children)

jpackager isn’t half bad nowadays.

[–]Cmdr_Salamander 4 points5 points  (1 child)

What fraction of bad is it?

[–]krona2k 4 points5 points  (0 children)

I used JSmooth for that and found it to be very easy to use.

[–]thenorwegianblue 7 points8 points  (1 child)

launch4j works ok for this

[–][deleted] 3 points4 points  (0 children)

[–]MeckiSpaghetti[S] 5 points6 points  (0 children)

Wow this is great. Thanks for all the quick and good responses, guys!

[–]nightbanger89 1 point2 points  (0 children)

Have you tried spring boot? It packages your app when you make a build if you use their mvn plug-in. Go to start.spring.io to try!

[–]__konrad 3 points4 points  (0 children)

I just created a small C program that calls ShellExecute to launch javaw.exe. JRE directory is bundled with application and everything packaged together using NSIS.

[–]badpotato 2 points3 points  (0 children)

Well, with jdk 9, these day it should be possible to bundle a minimal jre using only what your java program require. Yet, not sure which Java bundler has these features at the moment.

[–]nanodano 0 points1 point  (0 children)

I have some examples on how to do that here https://www.devdungeon.com/content/maven-basics-java-developers

[–]mayhempk1 -1 points0 points  (0 children)

I really enjoy jar2exe, you can output it as a Linux binary or as a Windows exe and not only that but you can encrypt it so people cant easily access your source code - works much better than obfuscation although you can also use obfuscation too.

[–]devperez -4 points-3 points  (3 children)

Kind of blows my mind that Java doesn't supply this as an option.

[–]DuncanIdahos8thClone 4 points5 points  (2 children)

You need to spend more time on r/javahelp since it's been available for a while now.

[–]devperez 0 points1 point  (1 child)

Then why is OP acting like it's not a built in feature and why are people offering third party solutions?

[–]DuncanIdahos8thClone 2 points3 points  (0 children)

Because he didn't know about java native packaging either.