JVM versus C++ compiler : <p>I have a query in which I cannot give a satisfactory answer. Java is notorious for its independence over machine architectures grace to JVM. I 've understood the following: </p>

<ul>
<li>Different JVM implementations are sitting on different machines as to produce the appropriate output (different for any different architecture) from the same input(.class files).</li>
</ul>

<p>Let's now consider C++. Why not to do the same with Java? Namely, implement different C++ compiler versions for different architectures, feed them with the same source and make every compiler produce the appropriate output; just make C++ compiler to mimic JVM! </p>

<p><em>This is my query since I cannot understand why Java is unique in that...</em></p>
