Convert Jar file to EXE executable.

[ad name=”AD_INBETWEEN_POST”] 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.

Get our Articles via Email. Enter your email address.

You may also like...

70 Comments

  1. manu says:

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

  2. Alex van Beek says:

    http://launch4j.sourceforge.net/

    Can generate multi platform wrappers.

    • 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

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

  3. Ali Lawati says:

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

  4. You welcome Ali Lawati.

  5. Mabimal says:

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

  6. prashant says:

    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

  7. raichoudhary says:

    mast idea

  8. jaysonkn says:

    Thank you very much

  9. magnetic says:

    May try Excelsior JET

  10. Andrew says:

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

    • Ferrybig says:

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

  11. Sunish VK says:

    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.

  12. DJ says:

    Thank You So Much! copacetic!!!

  13. waddah says:

    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 says:

      Java can not run without JRE.

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

  14. @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.

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

  16. gilles says:

    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 ?

  17. Jagan says:

    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

  18. How to convert exe to jar?

  19. sunil says:

    nice I created my first exe just coz of u
    thanks

  20. T2P's says:

    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 says:

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

  21. T2P's says:

    sorry masked resources

  22. J0Zi says:

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

  23. sharma says:

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

  24. subakar prabhu says:

    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 says:

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

  25. asas says:

    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

  26. Furqan Ahmed says:

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

  27. Lion Hart says:

    Thanks!

  28. Dewang says:

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

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

  29. Ujjal says:

    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 says:

      did you get an answer to your question?

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

  31. vijay pal singh says:

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

  32. touha says:

    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

  33. touha says:

    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

  34. pradeep says:

    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

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

  36. AMIT SARKAR says:

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

  37. satyendra says:

    how can convert .exe file to .jar files

  38. latha says:

    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

  39. S dutta says:

    hOW TO CONVERT A EXE FILE TO A JAR FILE

  40. Satnam says:

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

  41. 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

  42. santosh shinde says:

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

  43. pradeep says:

    easy way to create exe file through java executable file

  44. arklight says:

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

  45. arklight says:

    Also, Executor no longer even exists.

  46. Aditya says:

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

  47. fz says:

    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.

  48. furby says:

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

  49. Brajesh Vibhav says:

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

  50. Syed says:

    you are really awesome man thanks for the help

  51. Hi, can you please tell me how can we wrap up SQL files with these? I mean if I am building an application with Java + SQL server, how will I wrap both of them together to make a installable package?

    Thanks!

    • TyranX says:

      In my point of view about your question., you cannot pack both application and SQL server in one package unless the database you are using is embedded in your java application…

  52. Rashed khan says:

    help me to make .exe with of .jar with database (MySQL) i badly need it

  53. naim says:

    how i connect whole things with ur code ?

  54. SK Sahu says:

    Thank you Viral,
    Your information and tutorial, both are most helpful.

  55. Dewang says:

    Hi,

    These s/w very helpful to make exe , and also thnx to u to give info. about jar to exe but i have a prob in my exe.
    Actually i m using mysql db so i can’t integrate in exe, i can’t make sql connection , how can do this???

    Please help??

  56. maxxas says:

    I wrote an application which takes an .xls file with account information (account nr., swift code) and generates another .xls file, where IBAN and BIC code are there.

    The application works via an internet site (through AJAX controller), where it retrieves the IBAN and BIC with the help of account nr. and swift code (it takes some time until you’ve got the information). The output .xls is saved in the project directory ( writableWorkbook.write() ).

    The application works from JDeveloper but does not work from .jar or .exe file (I wrapped the .jar-file with launch4j). Do you have an idea what the problem could be? Thx in advance!..

  57. To all those who wish to embed a database – why not
    simply use Apache Derby or H2 or HSQL or similar
    java database?
    HTH,

    Paul…

  58. swapnil says:

    hi, i create a program in jFrame with database
    when i create it’s jar file it not support an mysql database.
    plz help me regarding this problem.

  59. Balaji says:

    After generating the exe, when i double click on it i am getting an error message like “The main class could not be found”.Could you suggest on resolving the same.

    -balaji

  60. Manuel Dahmen says:

    Nothing works in your links. Why?

  61. Can we use Apache Derby or H2 or HSQL?

Leave a Reply

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