Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Java (http://www.programmingforums.org/forum17.html)
-   -   Building the Executable in Eclipse (http://www.programmingforums.org/showthread.php?t=7933)

ReggaetonKing Jan 12th, 2006 10:50 PM

Building the Executable in Eclipse
 
I use Eclipse 3.1 to create Java Application, small ones, and I truly want to go to the next step and make the .exe (the executable). How would I go about doing that? My Java teacher told me to export it as a .jar file and it would run from there but i dont think that's how it works, can someone help me?

andro Jan 13th, 2006 12:02 AM

You don't make .exe with Java. Do what your teach said and create a .jar file. You can double click a .jar file and it will run.

xavier Jan 13th, 2006 9:37 AM

http://www.cs.laurentian.ca/badams/c...-tutorial.html
This loks like a good starting point.

Arevos Jan 13th, 2006 10:09 AM

Java's a platform independant language, and exes are platform dependant, so Java does not natively support being compiled into machine code. The standard way is to create a jar, as andro correctly points out.

This said, gcj can compile Java into executables, but I wouldn't recommend this for a beginner.

alcdotcom Jan 13th, 2006 12:57 PM

Something the link doesn't cover is saving a JAR description file. While creating the JAR, you'll come to the JAR Packaging Options dialog. If you select the check box next to save descrption of this JAR in the workspace and specify the file name, you will not have to go through the same process each time you want to create another JAR of your current project. However, if you add packages or directories to the project you will have to go through the normal process again, adding the new packages, and create the new JAR description file. Once the JAR description file (*.jardesc) is created, all you have to do to create a JAR file is right-click on the .jardesc file from Package Explorer and choose Create JAR.

ReggaetonKing Jan 13th, 2006 1:42 PM

Thanks you guys!


All times are GMT -5. The time now is 6:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC