Convert Jar file to EXE executable.
- By Viral Patel on February 3, 2009
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
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 can also try Launch4j that is opensource and hosted on Sourceforge.
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..
very nice thanks , i didn\’t knew these application do exist
You welcome Ali Lawati.
You missed Launch4J http://launch4j.sourceforge.net/
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
mast idea
Thank you very much
May try Excelsior JET
Nice post… Can we change the icon of the exe file using any of the above tools?
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.
Thank You So Much! copacetic!!!
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?
Java can not run without JRE.
However, if not installed, it should prompt to download and install automatically.
@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.
suggestive conclusion… wehehehe…. don’t try all just pick your most trusty p2p servers like mine….
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 ?
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
How to convert exe to jar?
nice I created my first exe just coz of u
thanks
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
the jae2exe key is not found and it is costly. does anybody have it?
sorry masked resources
pls how can i edit exe file… I’ve been lookn for executable file editor. Help Help me
how can i install in my pc… error code is 2755
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.)::
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
I want a software that can convert EXE files to JAR extension. Please help me out
Thanks!
very very help full!!!!!!!!!!!
thank you very much!!!!!!!!!!!!!
@Dewang – Glad the tutorial helped
You welcome..
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?
did you get an answer to your question?
Sir, I am curious what the widget you are using. Thank you sir forgive my english.
i am not able to make exe file in java plz help me
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
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
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
well, thanks for listing these applications. Is there a manual way to convert jar files to exe files without using any application.
I want a software that can convert EXE files to JAR extension. Please help me sir/mem
how can convert .exe file to .jar files
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
hOW TO CONVERT A EXE FILE TO A JAR FILE
Thanks yaar. JSooth .exe wrapper worked very nicely for me. It solved all of my app distribution problems…
again, thanks a lot.