Skip to main content



      Home
Home » Newcomers » Newcomers » compile java into *.exe file
compile java into *.exe file [message #214348] Thu, 07 June 2007 09:04 Go to next message
Eclipse UserFriend
Originally posted by: f.perez87.gmail.com

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.

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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: compile java into *.exe file [message #214402 is a reply to message #214356] Thu, 07 June 2007 12:13 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Paul Rubin" <rubin@msu.edu> wrote in message
news:f490h8$9lr$1@build.eclipse.org...
> With so many web sites including Java applets, I'd bet that most of your
> friends have Java installed.

Indeed, probably more friends have Java installed but are running on
non-Windows platforms than the opposite.
Previous Topic:Question regarding autogenerating getter & setter code
Next Topic:Is it possible to upgrade from 3.2.0 to 3.2.2
Goto Forum:
  


Current Time: Fri May 16 06:24:32 EDT 2025

Powered by FUDForum. Page generated in 0.95556 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top