Why Turn Your .JAR Into a .EXE?

I’ve worked in a few environments where IT/IS maintains very strict control over what software is installed on employee computers. As a developer this can be a real annoyance, especially when people from the IT/IS department question the needs of software developers to install, update, remove and re-install software on their computers. I understand that an IS department may find it necessary to control corporate machines, but engineering needs to be a clear exception to this rule.

That rant aside, I’ve found myself working on a few small desktop applications for users that require an application be placed on a computer. Its very easy to create a simple Java application without an installer than can be run from wherever. What isn’t so easy is instructing a user how to use the “java jar…” command, or, worse, installing the JRE on a computer that doesn’t already have it (or has an outdated version). There are tools out there to take care of this problem, JSmooth and Launch4j being two freebies among them.

These tools make it very convenient to package a .jar as a native Windows executable file, and bundle a JRE along with it (the bundled JRE being placed in some path relative to the .exe file).