Please explain with example why JVM is Operating System dependent.
In Java, compiler converts source code into byte code. JVM converts this byte code into instructions which processor understands. Finally processor reads and executes these instructions.
Every processor have their own instruction set. So Intel processor may not execute instructions meant for Sparc processor.
So as per my understanding JVM should be processor specific.
And , if two PC's have same processor and different OS say Linux and Windows, byte code created on windows machine should get executed on Linux machine.
But that is not the case. Please explain why JVM are OS specific and not processor specific.