exe
Hi everyone
I was wondering if I can get some help here. I have a Java application that I wrote using JCreator. It has a void Main in it so it is a standalone application(I think..). I was wondering how to create an .exe for the application. So that I wouldn't have to go into JCreator and compile it everytime I want to run it. There must be a way.
Richard
[383 byte] By [
airrazor] at [2007-11-11 6:48:14]

# 1 Re: exe
Usually, Java programs are not directly executable from the operating system. They are run by invoking the Java Virtual Machine appropriate for your operating system/hardware combination which interprets the .class file(s) which is the bytecode instructions for the JVM [bytecode interpreted by JVM results in statements executed/interpreted by the level of the hardware above the CPU level]. Therefore you "run" a Java program by using the command "java XXXX [and any command line arguments]" where XXX is the name of the .class file which contains the method main for the program. Once a class file is compiled, you should not need to re-compile it (unless you've made a change to the source .java file) - just invoke the JVM.
There are programs you can obtain which will make object files of class files and other resources and then link them into an exe. Do a search for "java compile exe" and you'll find them.
nspils at 2007-11-11 22:40:20 >

# 4 Re: exe
Take a look at this article. It enumerates all ways to generate .exe from Java, and it shows benefits and shortcomings of the each way.
http://www.excelsior-usa.com/articles/java-to-exe.html
Denis.
------
The most compilcated way to make .exe from Java is this:
http://www.excelsior-usa.com/jet.html
htayod at 2007-11-11 22:43:19 >

# 8 Re: exe
Google for "executable jar tutorial", there's pleny of tutorials available.
these are the first I found:
http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html
http://www.cs.princeton.edu/introcs/85application/jar/jar.html
Denis.
htayod at 2007-11-11 22:47:22 >
