![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
Java Executables
Hey does anyone know how to turn a Java Program into a stand alone Executable?
__________________
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 136
Rep Power: 0
![]() |
|
|
|
|
|
|
#3 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 773
Rep Power: 3
![]() |
Find a compiler that compiles Java to native machine code. Why do you need it to be an executable?
|
|
|
|
|
|
#4 |
|
Expert Programmer
|
I would like to make stand alone applications
__________________
|
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 136
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
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 |
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,316
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 136
Rep Power: 0
![]() |
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! |
|
|
|
|
|
#9 |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
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. |
|
|
|
|
|
#10 |
|
Hobbyist Programmer
|
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|