{"id":1144,"date":"2022-02-24T18:30:07","date_gmt":"2022-02-24T18:30:07","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=1144"},"modified":"2022-02-24T18:30:07","modified_gmt":"2022-02-24T18:30:07","slug":"java-jdk-jre-and-jvm","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/02\/24\/java-jdk-jre-and-jvm\/","title":{"rendered":"Java JDK, JRE and JVM"},"content":{"rendered":"\n<p>In this tutorial, you will learn about JDK, JRE, and JVM. You will also learn the key differences between them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jvm\">What is JVM?<\/h2>\n\n\n\n<p>JVM (Java Virtual Machine) is an abstract machine that enables your computer to run a Java program.<\/p>\n\n\n\n<p>When you run the Java program, Java compiler first compiles your Java code to bytecode. Then, the JVM translates bytecode into native machine code (set of instructions that a computer&#8217;s CPU executes directly).<\/p>\n\n\n\n<p>Java is a platform-independent language. It&#8217;s because when you write Java code, it&#8217;s ultimately written for JVM but not your physical machine (computer). Since JVM \u200bexecutes the Java bytecode which is platform-independent, Java is platform-independent.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.programiz.com\/sites\/tutorial2program\/files\/how-java-program-runs.jpg\" alt=\"How does Java program work?\" title=\"Working of Java Program\"\/><figcaption>Working of Java Program<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jre\">What is JRE?<\/h2>\n\n\n\n<p>JRE (Java Runtime Environment) is a software package that provides Java class libraries, Java Virtual Machine (JVM), and other components that are required to run Java applications.<\/p>\n\n\n\n<p>JRE is the superset of JVM.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.programiz.com\/sites\/tutorial2program\/files\/java-realtime-enviornment_0.jpg\" alt=\"JRE contains JVM and other Java class libraries.\" title=\"Java Runtime Environment\"\/><figcaption>Java Runtime Environment<\/figcaption><\/figure>\n\n\n\n<p>If you need to run Java programs, but not develop them, JRE is what you need. You can download JRE from&nbsp;Java SE Runtime Environment 8 Downloads&nbsp;page.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"jdk\">What is JDK?<\/h2>\n\n\n\n<p>JDK (Java Development Kit) is a software development kit required to develop applications in Java. When you download JDK, JRE is also downloaded with it.<\/p>\n\n\n\n<p>In addition to&nbsp;JRE, JDK also contains a number of development tools (compilers, JavaDoc, Java Debugger, etc).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.programiz.com\/sites\/tutorial2program\/files\/java-development-kit.jpg\" alt=\"JDK contains JRE and other tools to develop Java applications.\" title=\"Java development kit\"\/><figcaption>Java Development Kit<\/figcaption><\/figure>\n\n\n\n<p>If you want to develop Java applications,&nbsp;download JDK.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Relationship between JVM, JRE, and JDK.<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn.programiz.com\/sites\/tutorial2program\/files\/jdk-jre-jvm.jpg\" alt=\"JRE contains JVM and class libraries and JDK contains JRE, compilers, debuggers, and JavaDoc\" title=\"Relationship between JVM, JRE, and JDK\"\/><figcaption>Relationship between JVM, JRE, and JDK<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn about JDK, JRE, and JVM. You will also learn the key differences between them. What is JVM? JVM (Java Virtual Machine) is an abstract machine that enables your computer to run a Java program. When you run the Java program, Java compiler first compiles your Java code to bytecode. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[290],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/1144"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=1144"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/1144\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=1144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=1144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=1144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}