Java Platform Independent Language
Overview
The important feature of the Java programming language is platform independence. Java is referred to as a “platform-independent programming language” because it can run on different platforms without requiring modifications to the program source code.
Platform Independent Language
A platform is the environment in which the application runs. A platform is a combination of the operating system and the device hardware. Platform independence is different from Portability.
The portability feature allows programs written for a particular platform to run on other platforms with minimum changes.
JVM
Java code is compiled into bytecode, which is a platform-independent representation of the Java program. The bytecode is executed by the JVM(Java Virtual Machine), which is specific to each underlying target platform. As long as the JVM is installed on the target platform, the bytecode can be executed without any changes to the code.
WORA
This feature allows a Java application that is compiled on one platform to run on any other platform. This feature is also called as WORA(Write Once, Run Anywhere).
The principle of “Write Once, Run Anywhere” is key to Java’s platform independence. It means that you can write Java code on one platform (for example, on Windows) and run it on any other platform like Linux, macOS, etc without modification, as long as the JVM is available.
—
Java Tutorials
Java Tutorial on this website: