File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes How to Convert .java to .exe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to Convert .java to .exe" Watch "How to Convert .java to .exe" New topic

How to Convert .java to .exe

Nikkie Babu

Joined: Nov 21, 2005
Posts: 7
Can anybody help me by sayong how to convert the .java files to .exe?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Might a double-clickable jar file suffice? That would be cross-platform as a side benefit.
Marcus Green
arch rival

Joined: Sep 14, 1999
Posts: 2813
This has been a frequent question since the very early days of Java (1995). Although it is possible to generate a *.exe that runs a Java program it generally brings very few benefits in that it will require the exact same runtime support (i.e. the disk space of the JRE) as the equivalent Jar file and will not provide any performance benefits as it will still be relying on running .class files through a virtual machine. You can investigate the GCJ solution which is a component of the GNU compiler chain but on balance I strongly recommend you don't pursue the route of trying to generate *.exe files. You will spend a large amount of time and energy and gain very little benefit even if you succeed.

SCWCD: Online Course, 50,000+ words and 200+ questions
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
If you simply would like to create an executable wrapper around your java application (jar file) you could consider Launch4j.
[ May 19, 2006: Message edited by: Edwin Dalorzo ]
Alan Hermin
Ranch Hand

Joined: Feb 16, 2006
Posts: 290
Use JBuilder....Great,Enterprise,Stable IDE,Plus you can make jar files and .exe files
Nikkie Babu

Joined: Nov 21, 2005
Posts: 7
Thanks for your help.
I agree. Here's the link:
subject: How to Convert .java to .exe
It's not a secret anymore!