JVM
is the main component of Java architecture and it is the part of the JRE (Java
Runtime Enviroment) .It
provides the cross platform functionality to java. This is a software process
that converts the compiled Java byte code to machine code. Byte code is an
intermediary language between Java source and the host system. Most
programming language like C and Pascal converts the source code into machine
code for one specific type of machine as the machine language vary from system
to system . Mostly compiler produce code for a particular system but Java
compiler produce code for a virtual machine . JVM provides security to java.
The
programs written in Java or the source code translated by Java compiler into
byte code and after that the JVM converts the byte code into machine code for
the computer one wants to run. JVM is a part of Java Run Time Environment that
is required by every operating system requires a different JRE .
Ques 2:- JVM provides portability explain..?
Implementations
of java specification for a variety of CPUs and architectures provides the
feature of portability. Foremost, without the availability of a JRE for a given
environment, it is impossible to run Java software.JVM
forms the part of large system i.e. the Java Runtime Environment (JRE). Each
operating system and CPU architecture requires a JRE. JRE consists of a set of
base classes i.e. an implementation of the base Java API as well as a JVM. The
byte code format is same on all platforms as it runs in the same JVM and it is
totally independent from the Operating System and the CPU architecture.
JVM
is java interpreter as it converts the byte code into machine code for the
computer one wants to run.
JRE
consists of a number of classes based on JavaAPI and JVM, and without JRE, it
is impossible
to run Java. So its portability really made it possible in developing write
once and run
anywhere software .
public class HelloWorld
{
public static void main(String
arr[] ) {
System.out.println(" Hello World !");
} }

Comments
Post a Comment