title: How exactly does java compilation take place?
body: <p>Confused by java compilation process</p>
  
  <p>OK i know this: We write java source code, the compiler which is platform independent translates it into bytecode, then the jvm which is platform dependent translates it into machine code.</p>
  
  <p>So from start, we write java source code. The compiler javac.exe is a .exe file. What exactly is this .exe file? Isn't the java compiler written in java, then how come there is .exe file which executes it? If the compiler code is written is java, then how come compiler code is executed at the compilation stage, since its the job of the jvm to execute java code. How can a language itself compile its own language code? It all seems like chicken and egg problem to me.</p>
  
  <p>Now what exactly does the .class file contain? Is it a abstract syntax tree in text form, is it tabular information, what is it?</p>
  
  <p>can anybody tell me clear and detailed way about how my java source code gets converted in machine code.</p>