The concept of Java is to execute code without being specific to a platform. If you compile your code into machine code, then it will only execute in the platform which you compiled it, and compatible ones. This goes against the philosophy of Java, "Write once, run anywhere".
So, there is no way to compile your Java code to machine code (as far as I know). Even if you did that using some code conversion tool, then it wont be "Java" anymore. :)
The plus points of Java (like platform independence, security - through sandbox) and all other dependencies (libraries, thread management) are provided by the JVM. Without JVM, it will not be possible to achieve those.
Regards.
- Yohan
|