-->

Explain JVM , JRE , JIT , JDK in detail.

Posted by Admin on
JDK (Java Development Kit) :- IT contains Java Compiler , Debugger , libraries , bundling and deployment tools. It contains all the tools that you will need to compile a program ,to develop an Applet program and then compile them it will provide the AppletViewer,all such things are the parts of JDK, so to develop the java program  you can use any Editor(notepad) but to compile them you  need to have the JDK installed in your system.

JVM (Java Virtual Machine) :- JVM is the heart of java programming language. When we run a program, JVM is responsible to converting Byte code to the machine specific code. JVM is also platform dependent and provides core java functions like memory management, garbage collection, security etc. JVM is customizable and we can use java options to customize it, for example allocating minimum and maximum memory to JVM. JVM is called virtual because it provides an interface that does not depend on the underlying operating system and machine hardware. This independence from hardware and operating system is what makes java program write-once run-anywhere.

JRE (Java Runtime Enviroment):- Java Runtime Environment contains JVM, class libraries, and other supporting files.It does not contain any development tools such as compiler, debugger, etc.Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE.
JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.If you want to run any java program, you need to have JRE installed in the system. JRE is the box and JVM is the content of the box.
In simple words JRE=JVM+rt.jar.    
where rt.jar contains lang,util,awt swing,math etc Libraries or compiled .class files used to run our program.

JIT (Just In Time ):- JIT is the part of the Java Virtual Machine (JVM) that is used to speed up the execution time. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.






No comments:

Post a Comment