How to Convert a .jar into .exe?

irock97

Junior Member
Joined
May 30, 2011
Messages
108
Reaction score
54
Howdy,

I've codded a Java app , and would like to know how to run it. I've tried saving it as a .jar in Eclipse ; but it doesn't work.

Thanks
 
You may want to search for JarToExe Convert Wizard(v1.8) on google
 
.jar is a standard extension for java executables. If you weren't able to launch your jar file, it means something was wrong with your app/compilation settings or you didn't have JRE (java runtime environment) installed on your machine.

"converting" jar to an exe won't help much (the only difference will be the file extension) because you'll still need JRE to run your app.
 
It's probably because you're trying to save the project file instead of compiling the code.

Once you have compiled you can use a java executable wrapper, this is good because it will detect if the correct java vm is installed on the end users computer and download/install the correct one.

Code:
http://jsmooth.sourceforge.net/

There is one I found after a quick google search.

Happy coding! :)
 
Depending on your programming language of choice(other than Java) you could include the runtime files that are needed specifically for that file/project to run, have them drop to the machine, then run the program(the .jar).

This can be done easily in Visual Basic, but you must know every single file that is needed to run .jar applications as well as any registry information that needs to be placed or edited.

I have had to do such things in the past when I created custom installers for people's programs as well as my own, it's the same exact principal as the installer except the user doesn't have to confirm anything is going on(if the program you have is shady).

If the program you have is shady, there is an API call in vb6, vb.net and I believe C++ called "URLDownloadToA" or you could just Shell() it and have it silently download the file(s) that are needed to run the program at hand. You could code it up so that it detects when the file(s) are done being downloaded fully then have it run the program(s) that you need it to.

Now, this is a fairly technical thing to do if your pretty new to programming, and I would personally recommend doing it all in a Virtual Machine, so you don't accidentally screw up anything on your primary PC.

Also, I would do this - have to virtual machines, one for coding the "dropper/downloader" and then another one thats a fresh, clean version of the version of Windows that you are targeting, from there, I would run the "dropper" in the fresh clean version of windows, but before you do that, make a copy of the Virtual Hard Drive and everything so you don't need to go through the setup again with windows, if it works it works, if not, you can just delete the "used copy" of Windows, and start fresh with the clean copy, and just keep doing copy, drop, test to make sure it all works to your expectations before going all out with it.
 
Back
Top