Istiak Morsalin
Istiak Morsalin

Reputation: 11159

Is Java platform Independent or Operating System Independent?

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

Upvotes: 1

Views: 1288

Answers (2)

Jordi Castilla
Jordi Castilla

Reputation: 26961

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).

Upvotes: 2

MikeJ
MikeJ

Reputation: 2437

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.

Upvotes: 2

Related Questions