Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 12th, 2006, 10:50 PM   #1
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
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?
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jan 13th, 2006, 12:02 AM   #2
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 294
Rep Power: 3 andro is on a distinguished road
Send a message via AIM to andro
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.
andro is offline   Reply With Quote
Old Jan 13th, 2006, 9:37 AM   #3
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 381
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
http://www.cs.laurentian.ca/badams/c...-tutorial.html
This loks like a good starting point.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Jan 13th, 2006, 10:09 AM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
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.
Arevos is offline   Reply With Quote
Old Jan 13th, 2006, 12:57 PM   #5
alcdotcom
Programmer
 
Join Date: Jan 2006
Location: Dallas, TX
Posts: 49
Rep Power: 0 alcdotcom is on a distinguished road
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.
__________________
Java Blog
alcdotcom is offline   Reply With Quote
Old Jan 13th, 2006, 1:42 PM   #6
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Thanks you guys!
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:03 AM.

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