-4

Just like how we need to download different C compiler for different Systems, We need to download different JVM for different System. So, how is java platform independent ?

Bismuth OP
  • 11
  • 1
  • 6
    The author of a Java application can distribute the same compiled bytecode to be deployed on different platforms. – khelwood Apr 03 '21 at 19:57
  • This [article](https://medium.com/@neil.wilston123/why-java-is-platform-independent-1d82c2249a69) can also explain it. Although @dbush explained it nicely. – Nemanja Ranković Apr 03 '21 at 20:03
  • JVM Is a "runtime", and those are intractably platform-dependent. The code, however, like JavaScript, is portable. – tadman Apr 03 '21 at 20:08

1 Answers1

3

The Java language is platform independent because a particular piece of code is guaranteed to run the same on any system it is executed on.

While there may be a different JVM for each system, all JVMs are required to run the same Java bytecode the same way.

dbush
  • 205,898
  • 23
  • 218
  • 273