-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 ?

4
  • 7
    The author of a Java application can distribute the same compiled bytecode to be deployed on different platforms. Commented Apr 3, 2021 at 19:57
  • This article can also explain it. Although @dbush explained it nicely. Commented Apr 3, 2021 at 20:03
  • JVM Is a "runtime", and those are intractably platform-dependent. The code, however, like JavaScript, is portable. Commented Apr 3, 2021 at 20:08
  • The compiled code (.class files) is platform independent - no need to compile for each different OS (and, for example, provide OS dependent downloads) Commented Mar 21 at 22:14

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.