

JRE includes JVM, browser plugins and applets support.

When you have JRE installed on your system, you can run a java program however you won’t be able to compile it. JRE is a part of JDK which means that JDK includes JRE. In order to create, compile and run Java program you would need JDK installed on your computer. As the name suggests this is complete java development kit that includes JRE (Java Runtime Environment), compilers and various tools like JavaDoc, Java debugger etc. While explaining JVM and bytecode, I have used the term JDK.
#Pdf basics in java programing full book code
That is why we call java as platform independent language.Īs discussed above, javac compiler of JDK compiles the java source code into bytecode so that it can be executed by JVM. Each operating system has different JVM, however the output they produce after execution of bytecode is same across all operating systems. So, now that we understood that the primary function of JVM is to execute the bytecode produced by compiler. It takes java program as input and generates java bytecode as output.ģ) In third phase, JVM executes the bytecode generated by compiler. Phases are as follows: we write the program, then we compile the program and at last we run the program.ġ) Writing of the program is of course done by java programmer like you and me.Ģ) Compilation of program is done by javac compiler, javac is the primary java compiler included in java development kit (JDK). Before, we discuss about JVM lets see the phases of program execution. Java terminologyīefore we start learning Java, lets get familiar with common java terms. It helps to create modular programs and reusable code. Writing, compiling and debugging a program is easy in java. It was developed by James Gosling and Patrick Naughton. JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation.
