Why Is Java Portable?

Why Is Java Portable?

I mentioned a few times that Java is portable and that Java programs can run on any

operating system. It is time to explain how this is possible.

Java is what we call a high-level programming language that allows a developer

to write programs that are independent of a particular type of computer. High-level

languages are easier to read, write, and maintain. But their code must be translated by

a compiler or interpreted into machine language (unreadable by humans because is it

made up of numbers) to be executed, because that is the only language that computers

understand.

JVM is needed to execute

a Java program. JVM stands for Java virtual machine, which is an abstract computing
machine that enables a computer to run a Java program. It is a platform-independent
execution environment that converts Java code into machine language and executes it.
So, what is the difference between Java and other high-level languages? Well, other
high-level languages compile source code directly into machine code that is designed
to run on a specific microprocessor architecture or operating system, such as Windows
or UNIX. What JVM does, it that is mimics a Java processor making it possible for a Java
program to be interpreted as a sequence of actions or operating system calls on any
processor regardless of the operating system.

And because the Java compiler was mentioned, we have to get back to Java 1.1,
which was widely used, even as new versions were released. It came with an improved
Abstract Window Toolkit (AWT) graphical API (collections of components used for
building applets), inner classes, database connectivity classes (JDBC model), classes for
remote calls (RMI), a special compiler for Microsoft platforms named JIT,4 support for
internationalization, and Unicode. Also, what made it so widely embraced is that shortly
after Java was released, Microsoft licensed it and started creating applications using it.
The feedback helped further development of Java, thus Java 1.1 was supported on all
browsers of the time, which is why it was so widely deployed.

Advertisement
Advertisement
Rosalía Sings, Dances, and Grinds on Rauw Alejandro at the Latin Grammys AWARD 2022 Photos From the Red Carpet & Show Govt Jobs