i know how to make Applets, but i want to create *.exe files.
how do i do that?
a piece of code is allways wanted...
> i know how to make Applets, but i want to create *.exe files.
> how do i do that?
> a piece of code is allways wanted...
Ideally, you don't: using a JRE is easier both for you and (in the long
run) for the user. It's also more efficient.
But if you must, see: http://www.mindprod.com/jgloss/nativecompiler.html
Oscar

Signature
Oscar Kind http://home.hccnet.nl/okind/
Java/J2EE Developer email available on website
> i know how to make Applets, but i want to create *.exe files.
> how do i do that?
Read the PE (Portable Executable) spec, and use a DataOutputStream to
write the data.
> i know how to make Applets, but i want to create *.exe files.
> how do i do that?
> a piece of code is allways wanted...
Based upon the phrasing of your question, I'm wondering whether you are
genuinely asking for a Java to native code compiler, or whether you are
simply asking how to write stand alone applications, instead of applets.
Java uses a runtime technology called a JVM - a Java Virtual Machine.
The applets you ran in your browser worked because the browser was able
to load and run a JVM (as a plugin). To write software that does not
require a browser to run, one simply calls the JVM directly, passing it
the name of the class with a special 'main' method. To create user
interfaces you can use classes like Frame in AWT (or JFrame in Swing)
to create windows. The rest of the UI code looks pretty much the same
as an applet, except you are adding it to a Frame object, not an Applet.
Sun's JVM is called 'java' (or java.exe on Windows), and can be run from
a shell/DOS prompt like any other program of that type. Running it
without any options will usually make it print some helpful usage
information.
-FISH- ><
adam - 27 Feb 2004 09:55 GMT
> > i know how to make Applets, but i want to create *.exe files.
> > how do i do that?
[quoted text clipped - 19 lines]
>
> -FISH- ><>
first, thank you very much for the answer.
i use kawa and the files i compile them i get .class files.
must i use the JVM
or is their a compiler that make .exe files?
Oscar kind - 27 Feb 2004 16:38 GMT
> i use kawa and the files i compile them i get .class files.
> must i use the JVM
> or is their a compiler that make .exe files?
Using the JVM is the preferred way; It's more flexible, and updates to your
program are smaller. However, if you really want to, gcj can compile java
to binaries. However, I'm not aware of a Windows version.
More information can be found in the resources section of this document:
http://www.javaworld.com/javaworld/javaqa/2000-06/02-qa-0609-exe.html
Oscar

Signature
Oscar Kind http://home.hccnet.nl/okind/
Java/J2EE Developer email available on website