![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
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.
__________________
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
Make a .jar file and you will be able to double-click it.
|
|
|
|
|
|
#3 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
__________________
"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 |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Oct 2005
Posts: 29
Rep Power: 0
![]() |
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.
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5
![]() |
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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|