Getting an .exe

I don't know if this question could be a bit stupid but,...How can I get a .exe file from my .class files?,in order to run the application anywhere.Thanks.
[191 byte] By [jmatee] at [2007-9-30 5:14:17]
# 1

You can't get an .exe unless you use some special tool that tries to compile Java to native code. An .exe is supposed to contain machine code, which is different from processor to processor, so it can't be cross-platform compatible. Meanwhile a .class file contains Java bytecode that is interpreted by the Java Virtual Machine (java.exe) and thus can be passed along to a different platform unchanged.

If you want an .exe for your application for a specific platform, try making a C++ program containing a call to system("java WhateverClass");. On Windows you can also give this program an icon, etc depending on what C++ compiler you use.

Matei at 2007-7-1 16:30:53 > top of Java-index,Administration Tools,Sun Connection...
# 2
Ok, I'll try it. Cheers.
jmatee at 2007-7-1 16:30:53 > top of Java-index,Administration Tools,Sun Connection...