Monday 21 November 2016

ARCHITECTURE OF JAVA LANGUAGE

Compilation and Interpretation :
Java is both a compiled and interpreted language.Firstly Java Compiler comes into picture and converts the Java Source Code into a byte code that can be executed on any platform.Finally Java Virtual Machine also called as JVM comes into picture and
converts the byte code into a form easily understood by the machine ,hence converts into machine code .So ,java is both Compiled and interpreted.
Java Virtual Machine is a run time environment for java programs .It is sometimes also called as JRE which converts the byte code into corresponding machine language program .
Java is  a platform independent language but JRE is platform dependent .The reason behind this is that it is written in C programming language which is platform dependent,
Java Virtual Machine consists of several modules that performs the following tasks:
Class Loader:The task of Class Loader is to load all the classes required for the execution of a program.Class Loader makes the program secure by separating the name space for the classes obtained through the network from the classes available locally.Once the byte code is loaded successfully the next step is to verify the code which is done by Code verifier.
Code Verifier : Code verifier verifies the code to see if any security problems are there in the code.It checks the Byte Code and ensures the following:


  • The code follows the Java Specifications.
  • There is no unauthorised access to memory.
  • The code doesnot causes any stack overflows.
  • There is no illegal data conversion in the code.

Once the code is verified and checked for security issues, JVM converts the byte code into machine code which will be executed in presence of Java Environment

No comments:

Post a Comment