Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Jun 15th, 2006, 4:56 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

Hey does anyone know how to turn a Java Program into a stand alone Executable?
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Jun 15th, 2006, 5:02 PM   #2
Toro
Hobbyist Programmer
 
Toro's Avatar
 
Join Date: Apr 2006
Posts: 136
Rep Power: 0 Toro is an unknown quantity at this point
You would make a excutable jar file.

EDIT: Google
Toro is offline   Reply With Quote
Old Jun 15th, 2006, 5:02 PM   #3
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 773
Rep Power: 3 Jimbo is on a distinguished road
Find a compiler that compiles Java to native machine code. Why do you need it to be an executable?
Jimbo is offline   Reply With Quote
Old Jun 15th, 2006, 5:20 PM   #4
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
I would like to make stand alone applications
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Jun 15th, 2006, 6:41 PM   #5
Toro
Hobbyist Programmer
 
Toro's Avatar
 
Join Date: Apr 2006
Posts: 136
Rep Power: 0 Toro is an unknown quantity at this point
It possible with Java but I feel it's stupid that Java only have .jars that are executable. What platform would you like to make this stane-alone application?

If you have Linux, you can download Java Web Start and have that execute a jar file.

On Windows, I personally like to convert jars into exe's. There are many free (yet limited) program that can do this for you with ease. Or you can just have your setting make a jar executable.
Toro is offline   Reply With Quote
Old Jun 22nd, 2006, 6:29 AM   #6
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
How do the well-known programs like Azureus do it anyway?
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Jun 22nd, 2006, 6:34 AM   #7
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,316
Rep Power: 5 grumpy will become famous soon enough
A jar is just a particular type of file that is interpreted by the JVM. It is not a native executable file.

The gnu compiler collection includes a java compiler that compiles to machine code on the target machine rather than to java bytecodes. Never used it for that myself, but may be an option worth checking out.
grumpy is offline   Reply With Quote
Old Jun 22nd, 2006, 11:11 AM   #8
Toro
Hobbyist Programmer
 
Toro's Avatar
 
Join Date: Apr 2006
Posts: 136
Rep Power: 0 Toro is an unknown quantity at this point
The O.P.'s question was how to turn his Java program into a "stane alone" executable. A Java Archive file can be a executable by packing all of his classes that makes up his program into this archive file. I find it weird myself but that is the only scheme I use and what taught. All Java program are interpreted by the JVM unless other-wise alter not to.

If anyone finds out have program are being executed any other way then share that info please!
Toro is offline   Reply With Quote
Old Jun 22nd, 2006, 11:03 PM   #9
Harakim
Hobbyist Programmer
 
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3 Harakim is on a distinguished road
There are a lot of programs that turn them into executables as previously stated.

If you just want a .exe, I think you can easily do it using .NET resources and a very short program.
Harakim is offline   Reply With Quote
Old Jun 23rd, 2006, 5:51 PM   #10
dark_omen
Hobbyist Programmer
 
Join Date: Dec 2004
Posts: 125
Rep Power: 5 dark_omen is on a distinguished road
Send a message via AIM to dark_omen
Can't you make like a small little program say in c++ or something that would just run the command that runs the jar file where the command in the command prompt is java -jar "location.jar", and I think I've seen people use batch files to execute a jar file, try looking into those.
dark_omen 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 10:51 PM.

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