Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Jan 24th, 2006, 8:59 PM   #1
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 597
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
Java Executables

Does anybody know how I can make one of my Java Programs into an executable? To be more specific I mean I want to make one of my Java Programs so I can run it just by double clicking on an icon.
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Jan 24th, 2006, 10:44 PM   #2
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 316
Rep Power: 4 andro is on a distinguished road
Send a message via AIM to andro
Make a .jar file and you will be able to double-click it.
andro is offline   Reply With Quote
Old Jan 25th, 2006, 9:03 AM   #3
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Hope this helps

http://csdl.ics.hawaii.edu/~johnson/...jar-files.html
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old Jan 25th, 2006, 7:17 PM   #4
JavaMan
Newbie
 
Join Date: Oct 2005
Posts: 29
Rep Power: 0 JavaMan is on a distinguished road
For Mjordan2nd's tutorial, make sure when you type in Main-Class: psae.HelloWorld you press enter to make another line. I don't know why, but sometimes when you are creating a .jar it does not recognize the main class unless you leave a empty line below it.
JavaMan is offline   Reply With Quote
Old Jan 25th, 2006, 7:32 PM   #5
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5 grumpy will become famous soon enough
Doing it via a Jar file obvious requires having the Java VM installed.

If you want to go the whole hog, and build a native executable (which doesn't require a JVM to work), an alternative is the Java compiler in the gnu compiler collection, here. There are some limits, but it is a pretty fair alternative for a lot of use cases.
grumpy 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 12:49 AM.

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