Best JAR to EXE Conversion Tools, Free and Commercial

A companion to the article
Convert Java to EXE — Why, When, When Not and How

What exactly do you want to do with your jar file?

Make a Real Native Binary

Ahead-Of-Time compilers transform portable Java bytecode into optimized native code for particular target platforms.

Make It Look Like an EXE

Launcher/wrapper generators create native executables that run your app on a conventional JRE, whereas Java-aware setup authoring tools also integrate them into native desktop environment.

Just Make Launching It Easy

Executable Jar is the simplest way to enable your end users to launch your app, whereas Java Web Start and JNLP enable delivery of Java applications from a standard Web server.

Ahead-Of-Time Compilers

Pros:

  • Protection from decompilers
  • Performance improvement
  • Better user perception
  • Native deployment

Cons:

  • Available only for major platforms
  • Only one solution is certified Java Compatible
  • May not support the latest version of Java
  • Limited applicability (not all applications can be fully statically compiled)
Learn More

Excelsior JET

Platforms: Windows (32/64‑bit), OS X (64‑bit), Linux (32/64‑bit)

License: Proprietary

Compatibility: Certified Java™ Compatible on all supported platforms, runtime library compiled from licensed Oracle sources

Java version supported: Java SE 8u65

Status: Actively developed

Price: From $1,500, discounts and free licenses available

Web Site: excelsiorjet.com

GCJ (GNU Compiler for Java)

Platforms: 15 platforms, from bare metal ARM to IBM mainframes

License: Open source (GPL)

Compatibility: JDK 1.4 with some 1.5 features

Status: Development appears to be stalled since 2008

Web Site: gcc.gnu.org/java/

RoboVM

Platforms: iOS

Compatibility: Android Java

License: Open source (compiler and Eclipse plug-ins are mostly GPL, runtime is a mixture of Apache 2.0, BSD-like and public domain)

Status: Actively developed

Web Site: robovm.org

Atego PERC

Focus: Embedded/real-time

Platforms: Most popular RTOS, Linux, and other embedded O/S running on ARM, PowerPC, MIPS, x86 and other embedded CPUs

License: Proprietary

Compatibility: Not certified, supports a subset of the standard Java API

Pricing: On request

Web Site: atego.com/products/atego-perc

Java-aware Setup Authoring Tools

Pros:

  • Complete desktop integration
  • Can be platform-specific or cross-platform
  • Localization support
  • Flexibility

Cons:

  • Most tools are pricey and overly complicated
Learn More

Advanced Installer for Java

Platforms: Windows, OS X

Price: $499 (includes both Windows and OS X support)

Web Site: www.advancedinstaller.com/java.html

install4j

Platforms: Windows, OS X, Linux, Unix

Price: Windows-only: from $699
Multiplatform: from $1,999

Web Site: ej-technologies.com/products/install4j

InstallAnywhere

Platforms: Windows, Linux, OS X, Solaris, AIX, HP-UX, IBM, plus FreeBSD and other Unices

Price: from $2,149

Web Site: installanywhere.com

InstallShield

Platforms: Windows

Price: from $649

Web Site: installshield.com

JExpress

Platforms: Windows, OS X, Linux, Solaris

Price: from $2,422

Web Site: denova.com/jexpress

JWrapper

Platforms: Windows, OS X, Linux

Price: from GBP 1,590, free startup licenses available. Caveat: all but Enteprise licenses require co-branding

Web Site: jwrapper.com

Java Packager

Platforms: Windows, OS X, Linux, Solaris

License: Proprietary

Status: Active

Price: Available freely as part of the Oracle JDK

Web Site: Self-Contained Application Packaging, Java Platform, Standard Edition Deployment Guide

IzPack

Platforms: Windows, OS X, Linux, Solaris

License: Open source (Apache 2.0)

Status: Active

Web Site: izpack.org

jelude (NSIS Script)

Platforms: Windows

License: Public Domain

Status: Not updated since 2007

Web Site: filehoo.com/download-Jelude.aspx

Platforms:

License:

Status:

Price:

Web Site:

Launchers and Wrappers

Pros:

  • JRE version check
  • JRE download or bundling
  • Unique process name and icon
  • No end-user training

Cons:

  • Platform specific
  • Desktop integration capabilities absent or very limited
Learn More

Jar2Exe

Platforms: Windows and Linux

Price: Personal: $29.95, Standard: $145

Web Site: jar2exe.com

JExePack

Platforms: Windows

License: Shareware

Price: $99.95 (site license $499.95), free for personal, non-commercial use

Web Site: duckware.com/jexepack

Jlaunch

Platforms: Windows

License: Shareware

Status: Looks pretty outdated

Price: $30

Web Site: magi-au.com/download

NativeJ

Platforms: Windows

License: Commercial

Status: Stable, not actively developed

Price: from $19.95 (Express) to $149.95 (Ultimate)

Web Site: dobysoft.com/products/nativej

AppBundler Ant Task

Platforms: Windows, OS X, JNLP, executable jars

License: Unclear

Status: Abandoned, does not support Java 7

Web Site: github.com/joshmarinacci/AppBundler

Java Launcher

Platforms: Windows

License: Unclear, sounds like freeware

Status: Last updated in 2006

Price: Free

Web Site: syncedit.com/software/javalauncher

Java Packager

Platforms: Windows, OS X, Linux, Solaris

License: Proprietary

Status: Active

Price: Available freely as part of the Oracle JDK

Web Site: Self-Contained Application Packaging, Java Platform, Standard Edition Deployment Guide

JSmooth

Platforms: Windows

License: Open source (GPL)

Status: Not updated since 2007

Web Site: jsmooth.sourceforge.net

Launch4j

Platforms: Windows (Launch4j itself also works on OS X and Linux)

License: Open source (BSD/MIT)

Status: Active

Web Site: launch4j.sourceforge.net

Packr

Platforms: Windows, OS X, Linux

License: Open source (Apache)

Status: Active

Web Site: github.com/libgdx/packr

Platforms:

License:

Status:

Price:

Web Site:

Java Web Start

Pros:

  • Available for all major desktop platforms
  • Single distribution for all JWS-enabled platforms
  • Code-signing and sandboxing
  • Versioning and incremental updates
  • Automatic installation of JREs and optional packages
  • Use of third-party tools is optional

Cons:

  • Internet connectivity required if JWS, JRE, and/or an Optional Package is not present on the system
  • Support for jnlp MIME type required on both Web server and browser
  • Limited desktop integration capabilities
Learn More

Java Packager

Platforms: Windows, OS X, Linux, Solaris

License: Proprietary

Status: Active

Price: Available freely as part of the Oracle JDK

Web Pages:

Automatic JNLP Generator

PHP script for generating JNLP descriptors.

Platforms: all

License: Unclear

Status: Unknown

Web Site: www.digitalgemstones.com/code/tools/jnlp.php

OpenJNLP

Alternative open source implementation of the JNLP protocol.

Platforms:

License: MPL

Status: Last updated in 2002

Web Site: sourceforge.net/projects/openjnlp

Xito Application Manager

Interesting open source network application manager

Platforms: Any Java-enabled platform

License:

Status: Last updated in 2008

Web Site: xito.sourceforge.net/projects/appmanager

Platforms:

License:

Status:

Price:

Web Site:

Platforms:

License:

Status:

Price:

Web Site:

Executable Jars

Pros:

  • No need to use any third-party tools
  • Single distribution for all Java-enabled platforms

Cons:

  • Application will not start on systems that do not have a JRE (properly) installed
  • Application will not work if it uses APIs absent in the default JRE
  • Need to teach users that jar files are clickable

Resources:

Learn More

Tools:

All that you need is the standard jar tool from the JDK.

To create an executable jar, specify the main class of your application, any extra jar files it may require, and so on in the manifest file:

Main-Class: MyAppMain
Class-Path: mylib.jar

Then run the JDK jar tool to package your application's classes and resource files, specifying the m option and the name of your manifest file:

jar cvfm MyApp.jar MyApp.mf *.class *.png *.wav

Now, if you type

java -jar MyApp.jar

the Java launcher will read the manifest from MyApp.jar and invoke the main method from the class MyAppMain. Moreover, if you double-click that jar file on a system that has a JRE installed, it will invoke the Java launcher automatically.

Note: Jar files are associated with the javaw launcher on Windows, which does not open a console on startup. If your application needs a console, write a batch file which would start it using the java launcher.

If your application consists of more than one jar file, the following open source tools are supposedly capable of correctly repackaging multiple jars into one:

  • One-JAR - Jar repackager
  • Autojar - Jar repackager and shrinker
  • Fat Jar - Single-jar deployment plug-in for Eclipse

See also Java Launcher.