Very first Java compiler developed by Sun Microsystems was written in C using some libraries from C . Today java compiler is written in java and JRE in C.we can imagine java compiler written in java - 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.

- dc official App