1

I'm confused about the topic of platform or OS independence.

Doesn't "independent" imply that Java code should run on any machine and need no special software to be installed? Yet the JVM needs to be present in the machine.

For example, we need to have the Turbo C Compiler in order to compile C/C++ source code and then execute it. The machine has to have the C compiler.

Could somebody please what is meant when Java is described as "platform independent" or "OS independent"?

1
  • 3
    Just because support doesn't exist for Java on a particular OS/platform, doesn't mean it's "not" platform independent. What makes it independent, is you can compile the source code and take that to what ever OS/platform there is a supporting virtual machine, you don't need to recompile the code to meet the needs of the platform. I'm sure, if it's possible, someones working a port of Java for the Chrome OS :P Oct 22, 2015 at 11:40

2 Answers 2

2

Its independent from the OS in terms of 'write once run anywhere' You code will run on any OS, as long as there is a Java Virtual Machine available.

No JVM is available for Chrome OS that I am aware of, but if one does become available then your applications will work without needing to be recompiled.

2

Java is OS independent language because SAME source code will work in any OS.

The issue you're facing is about the Virtual Machine, which translates java bytecode to each OS, so, Chrome OS still does not support Java because JVM for Chrome has not been developed (yet).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.