Friday, 4 October 2013

What is the difference between JRE,JVM and JDK?


Java Development kit(JDK):
 
JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file.
Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…
Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method.

You need JDK, if at all you want to write your own programs, and to compile them.

For running java programs, JRE is sufficient. JRE is targeted for execution of Java files i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries. JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file. 


The Java Development Kit (JDK) is an Oracle Corporation product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java Software Development Kit (SDK).
 

JRE (Java Runtime Environment)

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. If you want to run any java program, you need to have JRE installed in the system

JVM (Java Virtual Machine)


The Java Virtual Machine provides a platform-independent way of executing code
JVM has to interpret the byte codes to machine language, then it has to use some native or operating system specific language to interact with the system. One has to be very clear on platform independent concept.

As we all aware when we compile a Java file, output is not an ‘exe’ but it’s a ‘.class’ file. ‘.class’ file consists of Java byte codes which are understandable by JVM. Java Virtual Machine interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… JVM is platform dependent..

Click here to View all Programing languages

If you are a Java developer, it is very often that you think about understanding the JRE,JVM and JDK. Once if you understand these things, it would be quite easy for you to visualize things in logical manner. Also look at the picture below, that will clear all your questions about the JRE,JVM and JDK. This article explains about the each term and will make you understand perfectly - See more at: http://www.javabeat.net/2013/02/what-is-the-difference-between-jrejvm-and-jdk/#sthash.Pmr6lNmp.dpuf
If you are a Java developer, it is very often that you think about understanding the JRE,JVM and JDK. Once if you understand these things, it would be quite easy for you to visualize things in logical manner. Also look at the picture below, that will clear all your questions about the JRE,JVM and JDK. This article explains about the each term and will make you understand perfectly - See more at: http://www.javabeat.net/2013/02/what-is-the-difference-between-jrejvm-and-jdk/#sthash.Pmr6lNmp.dpuf
If you are a Java developer, it is very often that you think about understanding the JRE,JVM and JDK. Once if you understand these things, it would be quite easy for you to visualize things in logical manner. Also look at the picture below, that will clear all your questions about the JRE,JVM and JDK. This article explains about the each term and will make you understand perfectly - See more at: http://www.javabeat.net/2013/02/what-is-the-difference-between-jrejvm-and-jdk/#sthash.Pmr6lNmp.dpuf
If you are a Java developer, it is very often that you think about understanding the JRE,JVM and JDK. Once if you understand these things, it would be quite easy for you to visualize things in logical manner. Also look at the picture below, that will clear all your questions about the JRE,JVM and JDK. This article explains about the each term and will make you understand perfectly - See more at: http://www.javabeat.net/2013/02/what-is-the-difference-between-jrejvm-and-jdk/#sthash.Pmr6lNmp.dpuf

No comments:

Post a Comment

Please do not enter any Spam link in the Comment box

Featured post

10 Best Ways to Earn Money from Facebook

10 Best Ways to Earn Money from Facebook Facebook is a household name all over the world. The social networking platform has more than...