JIT compilers are used to convert java byte-code into native machine language. And as far as I know, there is no program which can directly convert java byte-code into binary file such as .exe files. So why JIT compilers can't be used to produce binary from the byte-code?
The JIT compiler, compiles the code dynamically.
A static compiler cannot do these things.
JIT = Just In Time. An *.exe is compiled way before of execution. </nitpick>
;)
As others said, there is more to a JVM than just compiling bytecode to native machine code. However, these parts of a JVM can be put into a native library ("dll").
There is at least one project to generate native binaries out of java code: GCJ (http://en.wikipedia.org/wiki/Gcj). I don't know how good it is and whether there is a windows version available. There might also be other Java-to-native compilers out there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With