Platform-Independency (Write Once, Run Anywhere) of Java - Useless Computer

Platform-Independency (Write Once, Run Anywhere) of Java

Share This

What is Java?

Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

Platform In-dependency: Write Once Run Anywhere (WORA)

A popular programming catchphrase introduced to describe Java’s cross-platform capabilities. It meant you could create a Java program on, let’s say, Windows, compile it to bytecode, and run the application on any other platform that supports a Java Virtual Machine (JVM).


In this case, a JVM serves as an abstraction level between the code and the hardware. WORA approach in Java How WORA approach works in Java All major operating systems, including Windows, Mac OS, and Linux, support the JVM. And, unless you’re writing a program that relies mostly on platform-specific features and UI, you can share a big chunk of bytecode.

When a java program (.java) is compiled by java compiler, it gets converted into a class file having extension as .class this file has data in the form of byte codes. These byte codes acts as an intermediate between the source code and the machine code. One more thing about these byte codes is that they are not platform specific, which means that by using JVM.
i.e. Java Virtual Machine it becomes possible to run Java programs on numerous platforms. Note that Java is platform independent but the JVM (Java Virtual Machine) is platform dependent.

The implementation of JVM varies for each OS , but when it comes to execution of Java byte code every platform executes the same one. The one thing which gives Java this ability of WORA is it's platform independence. Only thing with Java is that to achieve WORA is that, each device’s OS must have its own version of JVM (Java virtual machine) built-in.

That's how Java became more popular than other programming languages. Hope you all like it.

1 comment:

Pages