Hello Everyone,

i'm trying to convert a .jar file to .exe... first of all is it possible? If so then how?

i dont know whether we can convert .jar into .exe but for my recent java project i have tried to convert my .jar file into .bat which is similar to .exe file.

you can do it by writing the code in notepad and save it as [filename].bat

java.exe -cp [your jar file name].jar;. [n ur first java file name from where u want to start your batch file]

remember write only java file name dont write java_file_name.java n dont wirte in [] directly write the names

Take a look at the free program Installer Creator -- it lets you set up an install wizard for your program and makes it appear to be exe-ish (an icon shows up in your start menu and on ur desktop etc that you can double click that will link to the .jar)

yes, and quite easily to do, but my advice would be: DON'T
just like java itself, jar files are cross platform. if you create an exe, you'll limit your users, since exe files are not platform independant.

Why!? Why!? Why!!? I say!

Why all "beginners" absolutely feel the need to do this is just beyond me. I would think it would be much easier to simply Google "How do I deploy/distribute my Java app" and find out the proper way to do it, rather than simply assuming that an "exe" is needed.

Not only does that lock you into one platform it locks you into one version. Any improvements (including security fixes) that come with newer versions of the JRE, are, of course, blissfully ignored.

Edited 5 Years Ago by masijade: n/a

Hello Everyone,

i'm trying to convert a .jar file to .exe... first of all is it possible? If so then how?

its possible but why would you ever want to do that? Java is so great becuase it works on any OS.

This question has already been answered. Start a new discussion instead.