There are different versions of JVM for different operating systems/platforms. Which means that the people who developed it have made different interpreters for major operating systems. If at all a new OS comes today will java work on it too? So When we say platform independent are we restricting to platforms for which JVM is available or is Java actually platform independent?
There are different versions of JVM for different operating systems/platforms. Which means that the
Share
Clearly Java cannot run on a platform that doesn’t have a JVM. So in the most literal sense of the word, Java isn’t platform independent. But at the same time, your definition of platform independence isn’t useful. No possible language could ever be truly platform independent, because some aspect of the platform would need to be able to parse the language. And given all possible platforms, some necessarily won’t be able to parse it.
So, given the fact that many, many platforms run a JVM, and that Java code can be run on any JVM with the same meaning, Java is platform-dependent.