Java compiler in java

Question

Possible Duplicate:
implementing a compiler in “itself”

I was reading about the Java compiler and realized that it was written in Java. How can that be possible?

I mean, isnt this like "Chicken and egg" problem? How can we write the compiler in the same language?

Solution

The original was written in C. Then you can write the next version in Java. :)