![]() |
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?
|
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.
|
http://www.cs.laurentian.ca/badams/c...-tutorial.html
This loks like a good starting point. |
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. |
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.
|
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