Re:Why Systems Programmers Still Use C (2006)
by ajross on Monday March 19, 2012 @11:25AM
(#3724320)
It is certainly not possible to do syscalls in "Java". A system call is a special CPU instruction (e.g. INT, SYSENTER) not accessible to or defined in the Java VM specification.
What you do to effect a syscall is to call a JNI function to do the work. JNI is a C (!) API, defined in terms of the C (!) ABI for the platform.
And sure: you can generate native machine code in Java, just as you can in python or bash or even BASIC. But you can't call it.
Re:Why Systems Programmers Still Use C (2006)
by pjmlp on Wednesday March 21, 2012 @06:21AM
(#3733752)
Depends what you consider Java, as there are VM extensions coupled with compiler magic that allow it.
One such example is the Jikes VM:
http://jikesrvm.sourceforge.net/apidocs/latest/org/vmmagic/p...
Or the Sun's research in writing drivers in Java http://labs.oracle.com/techrep/2006/abstract-156.html
Following your example there are also JVMs coded in Java.