Can GNU gij be seen as a Java Virtual Machine?
I do not see gij listed as one of the Java Virtual Machines on开发者_如何学运维 http://en.wikipedia.org/wiki/List_of_Java_virtual_machines and I have not found posts here talking about this either. Can anyone tell me whether gij is a JVM and if not, explain what's the missing in gij or what's the difference? Thanks.
From The Java Virtual Machine Specification:
However, the Java virtual machine does not assume any particular implementation technology, host hardware, or host operating system. It is not inherently interpreted, but can just as well be implemented by compiling its instruction set to that of a silicon CPU. It may also be implemented in microcode or directly in silicon.
So GCJ can rightfully be called a Java Virtual Machine and GIJ, since it is an interpreter, even more so. The only requirement of a JVM is that it executes Java byte code.
If you look more closely at the Wikipedia page, you see GCJ in the bottom box listed in "Foundation and major implementations" of Java Virtual Machines.
I don't see any obvious reason not to call GNU gij a Java virtual machine ... modulo the obvious point that it could not ever be validated due to Oracle's stance on the TCK.
I'd say this is a "bug" in the Wikipedia list rather than a reflection on gij.
(Just looking through the list, I found and fixed another bug. It said that JNode used GNU Classpath, which it hasn't done for a few years now. If the list can get that wrong, it can be wrong about other things too.)
精彩评论