compile java into *.exe file [message #214348] |
Thu, 07 June 2007 09:04  |
Eclipse User |
|
|
|
Originally posted by: f.perez87.gmail.com
Hi, Im new using eclipse and programming on java. Im working on Windows
and I would like to know if its possible to compile a Java program into
an .exe file.
I just want to be able to send what I do to my friends, to use the
programs that I make as I use any other program or execute them without
eclipse.
Thank you very much
Frank
|
|
|
Re: compile java into *.exe file [message #214356 is a reply to message #214348] |
Thu, 07 June 2007 09:17   |
Eclipse User |
|
|
|
Frank wrote:
> Hi, I�m new using eclipse and programming on java. I�m working on
> Windows and I would like to know if it�s possible to compile a Java
> program into an .exe file.
> I just want to be able to send what I do to my friends, to use the
> programs that I make as I use any other program or execute them without
> eclipse.
>
There's a rather nice (IMHO) article about this, including pros and
cons, at http://www.excelsior-usa.com/articles/java-to-exe.html. What
you're looking for is discussed in the section on Ahead-of-Time (AOT)
compilers.
That said, I suspect you really don't need (and may not want) to compile
to .exe files. If your friends have Java runtime environments (JREs)
installed, and keep them as current as yours, all you need do is export
your application as a Java archive (JAR) file, and send them the JAR
(plus maybe instructions on how to run it, or a small batch file that
runs it for them). If you have Java installed on a Windows system and
the application does not need special parameters in the command line,
you can typically run it by double-clicking the JAR file's icon. If it
needs parameters, you can often put them in a shortcut to the JAR (or,
worst case, write that batch file).
With so many web sites including Java applets, I'd bet that most of your
friends have Java installed.
HTH,
Paul
|
|
|
|
Powered by
FUDForum. Page generated in 0.95556 seconds