Hi- I was wondering if anybody knows how can i get a stand alone executable file for an application that i write. Is there a compiler that can do that for me? where could i get one and how much is it going to cost? Thanks in advance lazaros
Netscape 6 and StarOffice were written in Java - you can tell from the look-and-feel and how slow they run. But they look like regular applications, so they must have a build-in JVM, which is what you need. Since Netscape 6 is based on an open source project, you might be able to get some information on how to do this by tracking that down.
Lazaros, The only free way to create an executable from Java code is via GCJ, provided by Gnu( www.gnu.org ) which translates your Java code to C++ which is then run through the GCC compiler. I believe this is for Unix based systems only... Several IDEs (I believe IBMs VisualAge, and I have heard Visual Cafe) support some kind of native code generation which consists of packaging a small JVM, your class files, and some kind of code to make the JVM execute them all together into an executable file. I think J++ (gag!) also supported native code compilation, probably through Visual C++, so your code could become more platform dependant than it already was... Anyway, as far as native compilation goes, think about it long and hard before you do it... one of the major reasons to write a program in Java is the "Write once, run anywhere" philosophy, and native code compilation destroys this... HTH, -Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Let's back up a moment here. WHY do you want it to be an executable?? There are several ways to invoke java applications without converting them to exe's. Howeveer, for creating an installation executable I hear that InstallSheild is quite good http://www.installshield.com/
"JavaRanch, where the deer and the Certified play" - David O'Meara
Can i do create java exe from the software availble at www.installshield.com ? bye Neeraj Vasudeva ------------------ Come to my site...http://www.sunjavacertification.com & explore the things..i am a new bie in java.
Come to my site...http://www.sunjavacertification.com & explore the things..i am a new bie in java.
Joined: Sep 29, 2000
Well, I still don't know WHY you are trying to make an exe however: InstallSheild creates an executable out of your application so that you can point at it from a web page and the user can download it and it will install the application on his machine. JToEXE creates an exe to kick off the application, although the class files are still used. http://www.bravozulu.com/Products/JToExe/jtoexe.html javaw invokes an application without the DOS window (which seems to be why some people are trying to create exe's). javaw comes with the SDK and JRE.
Seems like one reason WHY (or the my reason anyway), is if you want to write an app, distribute it, and not assume that everyone has a JVM on their box. I have heard about making a .jar and modifying the Manifest file, but do you have to include the jvm and the jre in the jar? Is that kosher with Sun? Do you need to include anything else in the .jar if you are assuming the user has no Java stuff on their machine?