HELP! to convert JAVA code into executable

Status
Not open for further replies.

mayank

Inactive
Contributor
hi,
Is there a way to make java program into an executable file. I m making a messaging cum file sharing utility as part of my project. CAn i make the code into executable icon and have some installation process for my project...through which opensource installation software, i can install the required setting in my client?
 
Make it into a Jar file. It can be run like any other executable provided the Java Runtime is present on that Machine.
 
You can use the GNU GCJ Java compiler to product Win32 executables that
do not require a JRE to be installed. But the executables are rather BIG.
Download the whole MinGW suite from: www.mingw.org

Here's a sample of GCJ compilation:
Code:
gcj -s -O2 --main=HelloWorld HelloWorld.java -o HelloWorld.exe
Size of the executable HelloWorld.exe is only 2.04MB. ;)

Remember that GCJ doesn't implement all of the Java specification, and usually
lags behind the JDK development. Also, you can't compile Swing code, though
it is possible to build GUI Java apps using GCJ with the IBM SWT.
 
Status
Not open for further replies.