What is the best way to compile your program into a .exe?

Yeah the header pretty much says it all. I started this program and i hoped to finish it by the end of spring break. now the only thing left to do is to make it a .exe. Anyone have a favorite compiler?
[208 byte] By [Lateralus01a] at [2007-11-26 22:30:39]
# 1
Try to google your question and use phrases such as "creating java exe" or "creating java executables".You should gain a few answers.
lethalwirea at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 2
yeah that was what i was first going to do i just wanted to see if flounder was gonna call me lazy again :)
Lateralus01a at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 3
Hi this JET compiler to get .exe file from u r class file.u just down load it from the net .It provides UserInterface to convert into executable filecompiler:jet4.8-eval.exe
Java@kondala at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 4
Try this one: http://launch4j.sourceforge.net/It is free.
chasana at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 5
theres a nice eclipse plug in that wraps up multiple jars into one exe, but i cant remember the nameuse altavista.com to search for it (not google! :p)
harveyballa at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 6

In most cases you don't. You create a JAR file, and maybe a Java Web Start file.

If they don't do what you want, you look at Java Aware Installers (Install Anywhere for example), and other Java packaging tools.

Then, and only then do you look at "native compilers". JET and GCJ.

Now if you bothered searching, you would have seen that this question is asked about once a week.

Message was edited by:

mlk

mlka at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 7

How very un-cross-platform-like ;)

I always thought the most portable solution was to stick with a JAR file and create a .exe which is nothing more than a launcher invoking java with the relevant commands. On OS X you can do the same sort of thing by bundling everything into a appName.app directory and in *nix (and OS X for that matter) you can write a shell script.

Same code, different launchers :)

d11wtqa at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 8

> How very un-cross-platform-like ;)

>

> I always thought the most portable solution was to

> stick with a JAR file and create a .exe which is

> nothing more than a launcher invoking java with the

> relevant commands. On OS X you can do the same sort

> of thing by bundling everything into a appName.app

> directory and in *nix (and OS X for that matter) you

> can write a shell script.

>

> Same code, different launchers :)

you mean like eclipse? incidentally, eclipse can convert your jars to OSGi bundles for you, then export the lot for you, with just such a native launcher. messy, but it does what people repeatedly seem convinced they need to do

georgemca at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 9
> What is the best way to compile your program into a .exe?The best way is not to do it.
BIJ001a at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...
# 10

> > What is the best way to compile your program into a

> .exe?

>

> The best way is not to do it.

Amen. The OP was just whipping up something over Spring break,

not trying to deploy something for the masses. Let's not overcomplicate

things: an executable JAR is just the ticket: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

DrLaszloJamfa at 2007-7-10 11:35:41 > top of Java-index,Java Essentials,New To Java...