+ 3

What gives java "Write once and run anywhere" nature?

2nd Feb 2018, 9:24 PM
Diwakar
Diwakar - avatar
3 ответов
+ 5
The Java Virtual Machine. It is available for almost all operating systems, architectures etc. It executes Java byte code. That's why you can't run Java apps unless you download Java.
2nd Feb 2018, 9:28 PM
Vlad Serbu
Vlad Serbu - avatar
+ 4
Java is executing it's code on the JVM (Java Virtual Machine) Which means that Java's source code doesn't have to adapt to the OS, but the Virtual Machine that runs Java on it has to change. So instead of Reprogramming Java's Development Kit (JDK), they only have to adapt the JVM to the OS. Thus you can execute Java programs anywhere on any machine as long as it has JVM installed on it.
2nd Feb 2018, 9:30 PM
Limitless
Limitless - avatar
+ 4
Thanks for valuable answer
2nd Feb 2018, 9:41 PM
Diwakar
Diwakar - avatar