I wonder how Java is more portable than C, C++ and .NET and any other language. I have read many times about java being portable due to the interpreter and JVM, but the JVM just hides the architectural differences in the hardware right? We'd still need different JVMs for different machine architectures right? What am I missing here? So if someone writes an abstraction layer for C for the most common architectures, let's say the CVM, then any C program will run on those architectures once CVM is installed, is it?
What exactly is this portability? Can .NET be called portable? There is no official .NET for linux machines, so it is not portable in that sense right?
Edit: Thanks all.. so finally my understanding is that Java is more portable because it adheres to a convention and does not allow stuff that creates hurdles for portability, like i=i++ having no meaning or different meanings on different machines. Java is strict, and this strictness allows the JVM to be written more easily. If you need a CVM, you'd need to either enforce standards on C, in which case it won't be C anymore, or writing the CVM would be extremely difficult as compared to writing JVM because it would have to handle way too many cases. I hope it's close to the right understanding :)