I would like to create a binary executable from a Java program without having to rely on a java virtual machine. Under windows? Under Linux ?
Can you compile java into binary (like C++) ?
It is perfectly possible, using gcj for instance. Take a look at http://gcc.gnu.org/java/
Reply:No. It is not in Java's nature. Java is compiled into "byte code", which in turn run on a "sandbox" of Java. Without that sandbox, Java won't run.
Reply:No, unfortunately this is not possible.
Java relies on certain elements like garbage collection that the virtual machine provides. A Java binary would be one huge memory leak if you were able to compile it.
This isn't the only reason it's not possible, just an example.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment