In which languages are the Java compiler (javac
), the virtual machine (JVM) and the java
starter written?
Jikes RVM, a self-hosting JVM used extensively for research purposes is written in Java. It's not the one people run on their desktops, but it's way up there on my list of "now let's show off the general power of the language."
The very first Java compiler was developed by Sun Microsystems and was written in C using some libraries from C++. Today, the Java compiler is written in Java, while the JRE is written in C.
We can imagine how the Java compiler was written in Java like this:
The Java compiler is written as a Java program and then compiled with the Java compiler written in C(the first Java compiler). Thus we can use the newly compiled Java compiler(written in Java) to compile Java programs.
Actually the Oracle JVM is written in C++, not C.
Take a look at the HotSpot JVM code here: http://openjdk.java.net/groups/hotspot/