Byte code and JVM
Java is a high level programming language. The program written in java is compiled for conversion to an intermediate code called Byte code.This code is independent of the machine on which the program is to run.This makes a java program highly portable as its Bytes code can easily be transferred from one system to another.When this byte code is to be run on any system an interpreter,known as java Virtual Machine ( JVM) is needed which translates the byte code to machine code.
Java machine code varies for different platforms like windows, UNIX, OS -2 etc.Thus java Interpreter Converts Bytes Code to the machine code accordingly.
JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java byte code can be executed. JVM acts as a virtual processor. Which processes the byte code to machine code instruction for various platforms. That is why it is called Java Virtual Machine.
Thus the java program uses compiler as well as interpreter both.
JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent The JVM performs following main tasks:
- Loads code
- Verifies code
- Executes code
- Provides run time environment
Comments statement in Java
Comments statements in Java: Comment statement in Java Programming some time it is difficult to user ...read more
Features and Advantages of OOps
Feature of OOPs It makes the complete program simpler by dividing it into a number of ...read more
Where Java is used
Where Java is used? According to Sun, 3 billion devices run Java. There are many devices ...read more
Types of Java Applications
Types of Java Applications There are mainly 4 types of applications that can be created using ...read more
History of Java
History of Java Java is pure object oriented programming language. It is developed by James ...read more
write once and run any where java program
Sun released the first public implementation as Java 1.0 in 1995. It promised Write Once, ...read more