2. What is JDK,JVM,JRE?
JDK: Java Development Kit contains tools needed to develop java
programs. the tools are(JAVAC.EXE=compiler , JAVA.EXE= how you start
the JVM) applet viewer etc.
JRE:
JRE=JVM+Java packages(class libraries as util,math,lang,awt,swing...)
Actually JVM runs the program, and it uses the class libraries, and other
supporting files provided in JRE
If you want to run any java program, you need to have JRE installed in the
system
JVM:
JVM is an Interpreter
When we compile a JAVA File, output is not an '.exe' but it's a '.class' file
consist of Java Byte Codes Which are understandable by JVM. JVM
Inteprets the bytecodes into the machine code depending on operating
system and hardware combination
4. Description of jvm
CL=loading classes and interfaces
Execution Engine= executing the instruction contained in methods of
loaded classes .
Each instruction of JVM has one method area and one heap area .
These area are shared by all thread running inside virtual machine
Method Area= class data
Heap Area= object
PC Register= Thread 1 , Thread 2, Thread 3
Java Stacks= stack frame
Native method= is a great way to gain and merge the power of C or
C++ programming into Java