hello and welcome to this session on Java today we are going to learn the basics of jdk GRE and JVM so let us begin and let us see JDK is an acronym for Java development yet JRE is an acronym for Java runtime environment and JVM is an acronym for java virtual machine so what exactly do they mean is let us look at jdk so jdk is an environment to develop compile and run java applications so if you are a developer you will have to develop and compile your java programs and finally you turn them on your system so this is what jdk provides us and when we talk about GRE gr is an environment to only run Java applications now what does this mean is if you are a user of Java and you just need to run and use java application then you need only a GRE and not agility and when we talk about JVM JVM is an interpreter to execute Java programs line by line and when we talk about Java programs here we mean the Java bytecode which are the dot class files so this is what a JVM is essentially now to understand it a little deeper let us look at a workflow of a Java program so whenever we create a Java program we save it as a dot Java file which is called the source code and then we compile our source code we get a dot class file which is the bytecode and then when we execute our program the Java interpreter or the JVM leads our bytecode line-by-line converts it into an object code for the machine and finally it runs on whatever operating system or machine we are using okay so this is a very basic workflow of a Java program if we look at it in a little more detail this is what actually happens we create our Java code or program in any editor let us say our Eclipse IDE and then we save it as dot Java files which is called in the source code and when we compile it it produces the bytecode which is the dot class files and finally when we executed the Java Virtual Machine or JVM interprets our bytecode reads the bytecode line-by-line converts it into the object code of the machine and finally our program gets executed okay now to understand this architecture this is what exactly happens in a very high level we have add Java source code we compile it it converts to bytecode JVM reads it interprets it and converts to the object code of the machine and finally X cubes it now if you look at this part where we are creating the Java code and compiling it the tools and libraries which are required to develop and compile as our programs are present inside JDK so that is why it is called as a Java development kit but if you look at this next part where we are just running our Java programs or application this comes as a part of a GRE where it wishes Java Runtime environment so if you look at the details JVM interprets and run Java bytecode and JVM is a part of JRE so JRE has JVM some runtime libraries which are required to run a java application but when we talk about JDK JDK has a compiler you can see Java C here and other libraries which are used to develop a Java program so JDK contains GRE and GRE contains JVM so whenever you will download JDK you will get GRE and JVM with it and whenever you will download GRE you will have JVM always ok so this is our little detailed diagram or architecture of the same concept you can see the java virtual machine at the base and then there are some libraries which are used to run a Java program and this makes our JRE ok but when we add some more tools and libraries which are used to compile and develop Java program it becomes JDK so you can see in Java compiler is here jar is here and other libraries which are used to to develop and compile a Java program and then the entire architecture or the entire system we can say this is a UDK so now you can actually appreciate it when you go to your browser and then in the initial sessions we have downloaded and installed in Java so when now I say download Java we get to this particular side and when we click here it says us 3 Java download I will click here and I will say Adrien start free download now do you see here it is actually downloading a JRE ok so it is I will cancel this it is downloading a GRE which will be used to run our Java applications but if you want a JDK if you want to develop our applications we have to go down and we have to select the developer step and here they will tell us that if you want to which our development then you have to download the GT Jadakiss are here you can go select this JDK and then you have all the options for different operating systems you can download the JDK and then you can start with your Java development okay so essentially if we now look at it we will understand JVM is used to execute tree compiled Java programs which are the dot class or the dot jar files are essentially the bytecode GRE is JVM plus some libraries to run the Java program and JDK is JRE plus some tools and libraries to develop Java programs so this is the basic difference and concept of QT k gr enj VM hope you like it – thank you