View Full Version : Java without runtime?
Nov 15, 2007, 08:09 AM
Is it possible to just write a Java program without using the Runtime behind it?
I.E. compile it straight to Machine Code like you would a C++ program?
Nov 15, 2007, 08:13 AM
No. Java can only compile to byte-code to run on a Java VM.
Nov 15, 2007, 08:19 AM
There are Java bytecode->native compilers out there, but realistically why would you? Java runs more than fast enough in a decent runtime. In some cases it actually runs faster than compiled C++ (normally as the C++ is compiled to the lowest common denominator x86 and the Java gets dynamically compiled at runtime to use ALL the CPU features available).
There is quite a list here (http://schmidt.devlib.org/java/native-compilers.html)