Convert Jar file to EXE executable.

I remember the day when I created a Tic Tac Toe game using Java Swing and packed it in an executable JAR file to distribute it among my friends. As few of my friends were not from computer background, they were unable to execute the JAR file. Hence I converted the JAR into EXE and send them the EXE.

It is sometime desirable to convert the JAR file in to EXE (executable) and distribute the EXE. Although the exe can be executed only in Windows environment, this will definitely affects the “platform independency” of a Java program. Still if you want to convert a JAR file in EXE then following tools are for you.

JSmooth .exe wrapper

java jar file to exe executable JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications. It makes java deployment much smoother and user-friendly, as it is able to find any installed Java VM by itself. When no VM is available, the wrapper can automatically download and install a suitable JVM, or simply display a message or redirect the user to a web site.

JSmooth provides a variety of wrappers for your java application, each of them having their own behaviour: Choose your flavour!

Download: http://jsmooth.sourceforge.net/

JarToExe 1.8

Jar2Exe is a tool to convert jar files into exe files.
Following are the main features as describe in their website:

  • Can generate “Console”, “Windows GUI”, “Windows Service” three types of exe files.
  • Generated exe files can add program icons and version information.
  • Generated exe files can encrypt and protect java programs, no temporary files will be generated when program runs.
  • Generated exe files provide system tray icon support.
  • Generated exe files provide record system event log support.
  • Generated windows service exe files are able to install/uninstall itself, and support service pause/continue.
  • New release of x64 version, can create 64 bits executives. (May 18, 2008)
  • Both wizard mode and command line mode supported. (May 18, 2008)

Download: http://www.brothersoft.com/jartoexe-75019.html

Executor

Package your Java application as a jar, and Executor will turn the jar into a Windows exe file, indistinguishable from a native application. Simply double-clicking the exe file will invoke the Java Runtime Environment and launch your application.

Download: http://mpowers.net/executor/

Advanced Installer

Advanced Installer lets you create Windows MSI installs in minutes. This also has Windows Vista support and also helps to create MSI packages in other languages.
Download: http://www.advancedinstaller.com/

Let me know other tools that you have used to convert JAR to EXE. And also comments/reviews about these tools.

If you read this far, you should follow me on twitter here.



58 Comments

  • manu 10 February, 2009, 4:14

    You can also try Launch4j that is opensource and hosted on Sourceforge.

  • Alex van Beek 10 February, 2009, 12:54

    http://launch4j.sourceforge.net/

    Can generate multi platform wrappers.

    • Osama Salah 2 March, 2011, 12:49

      Launch4j is very good, but it has two disadvantages:
      Its generated .exe file can be extracted (e.g. by winrar)
      Doesn’t support passing variable parameters (e.g. file name)

      However, it is suitable for most applications that don’t receive parameters

      • Viral Patel 2 March, 2011, 15:41

        @Osama – Thanks for sharing your findings with Launch4j.. Very useful for users..

  • Ali Lawati 12 February, 2009, 15:55

    very nice thanks , i didn\’t knew these application do exist :)

  • Viral Patel 18 February, 2009, 14:46

    You welcome Ali Lawati.

  • Mabimal 24 February, 2009, 11:40

    You missed Launch4J http://launch4j.sourceforge.net/

  • prashant 2 March, 2009, 13:12

    Hi Viral,

    i found many of the tools for converting jar to exe.
    Just see the links.
    Its very good and helpful.
    http://yuvadeveloper.blogspot.com/2009/03/convert-jar-files-to-exe.html

  • raichoudhary 17 March, 2009, 17:02

    mast idea

  • jaysonkn 27 April, 2009, 15:55

    Thank you very much

  • magnetic 25 June, 2009, 17:46

    May try Excelsior JET

  • Andrew 30 July, 2009, 12:48

    Nice post… Can we change the icon of the exe file using any of the above tools?

    • Ferrybig 1 October, 2012, 16:32

      you can do this whit the limited time of the Jar2Exe Wizard 1.8 tool

  • Sunish VK 31 July, 2009, 13:02

    I have tried most of the tools mentioned above. I found Inno Setup as the best tool for creating Setup exe files. That allows you to add icon for exe and also uninstallation support also there.

  • DJ 10 August, 2009, 14:48

    Thank You So Much! copacetic!!!

  • waddah 19 August, 2009, 1:20

    those r some vwey nice tools yet the problem persists in the fact that you need a JRE to start the exe files u created using these converters and its not always that easy for end users to install JRE.do u know of any program that converts jar into exe files that dont require a JRE environement to run at all?

    • Nepster 21 June, 2011, 12:48

      Java can not run without JRE.

      However, if not installed, it should prompt to download and install automatically.

  • Viral Patel 19 August, 2009, 14:06

    @waddah, I understand it is not common that people install JRE on their system. But I am not aware of any way of running a JAR file without JRE!! This may not be good solution but you may want to make a prerequisite of installing a JRE before installing your Java software.

  • evolutionionist 22 August, 2009, 11:54

    suggestive conclusion… wehehehe…. don’t try all just pick your most trusty p2p servers like mine….

  • gilles 5 September, 2009, 19:23

    Hello,
    And is it possible to reverse again the .exe generated by laun4j into a .jar,
    by exemple if i have converted a .jar into a .exe with launch4j and then i want to convert back this same .exe into .jar in order to find back my original .jar ?

  • Jagan 12 November, 2009, 19:30

    Hi Viral,
    ur posts are really good … thanks a lot :-)

    just wanted to add about JRE stuff .. jsmooth allows to point to a local JRE folder which can be shipped along with our product .jsmooth is another OSS wrapper for jar files files.
    (No installation required from user end).BUt that would add about 60mb to our distribution . Not really a problem if we are planning to distribute over a physical medium – Mem. Stick/CD/DVD

    Best setup packing options for a jar from my experience is
    IzPack + jsmooth

  • Helcio Vitor 27 March, 2010, 18:58

    How to convert exe to jar?

  • sunil 1 June, 2010, 19:05

    nice I created my first exe just coz of u
    thanks

  • T2P's 18 June, 2010, 5:47

    You can use my JAR2EXE converter Beta 1 to convert them. Made using NSIS and tha exe files had even resources. Get it from http://transfer2pc.weebly.com/1/post/2010/05/jar-to-exe-converter-beta-1.html

    • don 16 August, 2011, 19:02

      the jae2exe key is not found and it is costly. does anybody have it?

  • T2P's 18 June, 2010, 5:48

    sorry masked resources

  • J0Zi 20 October, 2010, 15:59

    pls how can i edit exe file… I’ve been lookn for executable file editor. Help Help me

  • sharma 4 November, 2010, 11:49

    how can i install in my pc… error code is 2755

  • subakar prabhu 23 November, 2010, 10:45

    We can easily convert jar to .exe or vice versa, through java IDE eclipse, we can do it in manually in matter of seconds, SAY NO TO SOFTWARE.)::

    • koushik 8 June, 2012, 9:52

      can u pls explain the steps in detail …
      I’m using eclipse helios

  • asas 29 November, 2010, 15:39

    mast idea is like the way u have code please regenerate the code and click on the right side of this your application and open with texteditor and simultaneously run the code with window media player you can get exe and jar file thanks alot for commment

  • Furqan Ahmed 1 December, 2010, 13:01

    I want a software that can convert EXE files to JAR extension. Please help me out

  • Lion Hart 16 February, 2011, 9:31

    Thanks!

  • Dewang 27 February, 2011, 18:36

    very very help full!!!!!!!!!!!
    thank you very much!!!!!!!!!!!!!

    • Viral Patel 2 March, 2011, 15:38

      @Dewang – Glad the tutorial helped :-) You welcome..

  • Ujjal 26 March, 2011, 2:19

    I want to make an exe of a jar in which I have used MySQL database.If there is any application creator which will also use MySQL [existing in localhost] and if then which one?

    • Anthony 29 March, 2011, 18:10

      did you get an answer to your question?

  • Rid Of Acne 27 April, 2011, 17:11

    Sir, I am curious what the widget you are using. Thank you sir forgive my english.

  • vijay pal singh 5 May, 2011, 14:01

    i am not able to make exe file in java plz help me

  • touha 14 May, 2011, 4:47

    thx for all these information but all these solution (.exe) is not valid to connect to database (MySQL)…
    can you help me or give me another another solution???
    and thx

  • touha 14 May, 2011, 5:21

    plzzzzzzzzz help me for these
    ……
    help me to make .exe with of .jar with database (MySQL)… and thx for your time…i make .jar but is not connect to my database (MySQL)… can u help me about that????
    and thx again

  • pradeep 24 June, 2011, 16:14

    How to convert the executable jar file which is developed using IzPack to ‘.exe’?

    can anyone please help me out….looking forward for replies…

    Thanks

  • Amit Aadarsh 12 November, 2011, 11:42

    well, thanks for listing these applications. Is there a manual way to convert jar files to exe files without using any application.

  • AMIT SARKAR 7 December, 2011, 17:52

    I want a software that can convert EXE files to JAR extension. Please help me sir/mem

  • satyendra 11 January, 2012, 11:26

    how can convert .exe file to .jar files

  • latha 24 February, 2012, 11:36

    Hi,
    I have created one html file including audio,video,text,image. I want to convert the file into jar file purpose of installing into mobiles….
    is it possible or, u have any other idea. can u suggest me

  • S dutta 15 March, 2012, 13:24

    hOW TO CONVERT A EXE FILE TO A JAR FILE

  • Satnam 16 May, 2012, 11:39

    Thanks yaar. JSooth .exe wrapper worked very nicely for me. It solved all of my app distribution problems…
    again, thanks a lot.

  • Suresh Kururp 4 June, 2012, 13:07

    Dear Mr Patel,

    I have downloaded a .jar file for my mobile. This is a “tanpura.jar” which is a music software. But the problem is that it has less sound (volume). The maximum is 20pt. even which is not at all audible.

    Please advise can be edit this software (jar file) to increase the volume.

    Please reply to my e-mail id.

    Regards,

    Suresh Kurup

  • santosh shinde 8 July, 2012, 18:04

    plz tell me,How to convert jar file to exe file using dos command prompt?

  • pradeep 19 July, 2012, 22:00

    easy way to create exe file through java executable file

  • arklight 25 August, 2012, 18:59

    JSmooth is garbage. It’s last public release was way back in 2007.

  • arklight 25 August, 2012, 19:01

    Also, Executor no longer even exists.

  • Aditya 14 October, 2012, 10:24

    Your blog is always a great help….thanks Viral.

  • fz 19 October, 2012, 3:28

    hello mr. I used “JarToExe 1.8″ after visit this page, your blog. But when I try to oen the “.exe” file it shows me “Java runtime environment not found”, means its not working. Can you have any solution for this? please replay. thank you.

  • furby 17 February, 2013, 19:22

    Thanks yaar. JSooth .exe wrapper worked very nicely for me. It solved all of my app distribution problems…
    again, thanks a lot.

  • Brajesh Vibhav 23 March, 2013, 12:37

    can you tell me how .exe convert in to .jar?

  • Syed 23 March, 2013, 23:54

    you are really awesome man thanks for the help

Leave a Reply

Your email address will not be published. Required fields are marked *

Note

To post source code in comment, use [code language] [/code] tag, for example:

  • [code java] Java source code here [/code]
  • [code html] HTML here [/code]