The Java runtime is written in ANSI C. The Java compiler, however, is actually written in Java. .
Actually (I'm one of the people who write Sun's JDK implementation), the …question doesn't make sense. The Java Language is a language specification - you don't write a language in a language, it's a specification. That would be like asking "Do you write French in German?" What I'm assuming the questioner really wanted to know is "What language is the JDK developed in?" That is, what is the underlying language the entire Java Virtual Machine and Class libraries developed in. The answer is: for the VM, it varies, since there are multiple different VM implementations. The Class libraries, however, are ALWAYS written in Java, as they are intended to be run using the Java VM itself. Certain libraries using JNI (Java Native Interface) may be partially written in a variety of other languages, as they are intended to be used OUTSIDE the JVM. The Sun/Oracle VM is written in C++. The BEA/Weblogic/Oracle VM is written in C. IBM's J9 is (I believe) written in C++. There are a couple of VMs actually written in Java, and one even written in Lisp. The vast majority of JVMs also include assembler code to speed certain "hot" areas. (MORE)