{"id":177,"date":"2018-12-27T13:10:28","date_gmt":"2018-12-27T13:10:28","guid":{"rendered":"http:\/\/cbitss.co.in\/blog\/?p=177"},"modified":"2019-01-19T08:03:47","modified_gmt":"2019-01-19T08:03:47","slug":"how-is-java-platform-independent","status":"publish","type":"post","link":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/","title":{"rendered":"How is Java platform independent?"},"content":{"rendered":"<p>The meaning of platform independent \u00a0is that, the <b>java source<\/b> code can keep running on every operating system.<\/p>\n<p>A program is written in a language which is a comprehensible \u00a0language. It might contain words, phrases and so forth which the machine does not understand it. For the source code to be known by the machine, it should be in a language understood by machines, ordinarily a machine-level language. Along these lines, here comes the role of a compiler. The compiler changes over the abnormal state language into a configuration understood by the machines. Accordingly, a compiler is a program that deciphers the source code for another program from a programming language into executable code.<\/p>\n<p>This executable code might be an arrangement of machine guidelines that can be executed by the CPU specifically, or it might be an intermediate representation that is translated by a virtual machine. This intermediate represented in Java is the <b>Java<\/b> Byte Code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-178\" src=\"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png\" alt=\"How is Java platform independent?\" width=\"715\" height=\"403\" srcset=\"https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png 300w, https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-768x432.png 768w, https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent.png 960w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/p>\n<p><b>Step by step Execution of Java Program:<\/b><\/p>\n<ul>\n<li>At whatever point, a program is written in JAVA, the javac gathers it.<\/li>\n<li>The result of the JAVA compiler is the .class record or the bytecode and not the machine native code (unlike C compiler).<\/li>\n<li>The bytecode created is a non-executable code and needs a interpreter to execute on a machine. This interpreter is the JVM and along these lines the Bytecode is executed by the JVM.<\/li>\n<li>And finally the program runs to give the desired output.<\/li>\n<\/ul>\n<p>In case of C or C++ \u00a0the compiler produces an .exe file which is OS dependent. When we attempt to run this .exe file on another OS it doesn&#8217;t run, since it is OS dependent and thus isn&#8217;t compatible with the other OS.<\/p>\n<p><strong>Jav<\/strong><b>a platform is independent but dependent on JVM platform<\/b><\/p>\n<p>In Java, the main point here is that the JVM relies upon the operating system \u2013 so on the off chance that you are running Mac OS X you will have an alternate JVM than if you are running Windows or some other operating system. This reality can be confirmed by trying to download the JVM for your specific machine \u2013 when attempting to download it, you will given a list of JVM&#8217;s comparing to various operating system, and you will clearly pick whichever JVM is focused for the OS that you are running. So we can complete that JVM is platform dependent and it is the reasons why Java is able to become \u201cplatform Independent&#8221;.<\/p>\n<p><b>Important Points:<\/b><\/p>\n<ul>\n<li>In the case of <b>Java<\/b>, it is the appearance of Bytecode that makes it platform independent.<\/li>\n<li>This adds to a vital component in the JAVA language termed as portability. Each system has its own JVM which gets installed automatically when the jdk software is installed. For each OS separate JVM is accessible which is capable to read the .class file or byte code.<\/li>\n<li>An imperative point to be noted is that while<b> JAVA <\/b>is platform independent language, the JVM is platform dependent. Distinctive JVM is designed for various OS and byte code can keep running on various OS.<\/li>\n<\/ul>\n<p>This article is contributed by professional java trainers of <a href=\"http:\/\/cbitss.in\/java-training-in-chandigarh\/\"><b>java training in Chandigarh<\/b><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The meaning of platform independent \u00a0is that, the java source code can keep running on every operating system. A program is written in a language which is a comprehensible \u00a0language. It might contain words, phrases and so forth which the machine does not understand it. For the source code to be known by the machine, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-177","post","type-post","status-publish","format-standard","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How is Java platform independent? - CBitss Technologies<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How is Java platform independent? - CBitss Technologies\" \/>\n<meta property=\"og:description\" content=\"The meaning of platform independent \u00a0is that, the java source code can keep running on every operating system. A program is written in a language which is a comprehensible \u00a0language. It might contain words, phrases and so forth which the machine does not understand it. For the source code to be known by the machine, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\" \/>\n<meta property=\"og:site_name\" content=\"CBitss Technologies\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-27T13:10:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-19T08:03:47+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png\" \/>\n<meta name=\"author\" content=\"author\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"author\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\"},\"author\":{\"name\":\"author\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/person\/9cb4eff9943da81bf79f3cf7a898af3c\"},\"headline\":\"How is Java platform independent?\",\"datePublished\":\"2018-12-27T13:10:28+00:00\",\"dateModified\":\"2019-01-19T08:03:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\"},\"wordCount\":528,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\",\"url\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\",\"name\":\"How is Java platform independent? - CBitss Technologies\",\"isPartOf\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png\",\"datePublished\":\"2018-12-27T13:10:28+00:00\",\"dateModified\":\"2019-01-19T08:03:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage\",\"url\":\"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png\",\"contentUrl\":\"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cbitss.co.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How is Java platform independent?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#website\",\"url\":\"https:\/\/www.cbitss.co.in\/blog\/\",\"name\":\"CBitss Technologies\",\"description\":\"Knowledge | Experience | Information\",\"publisher\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cbitss.co.in\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#organization\",\"name\":\"CBitss Technologies\",\"url\":\"https:\/\/www.cbitss.co.in\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2020\/08\/cropped-unnamed.png\",\"contentUrl\":\"https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2020\/08\/cropped-unnamed.png\",\"width\":500,\"height\":263,\"caption\":\"CBitss Technologies\"},\"image\":{\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/person\/9cb4eff9943da81bf79f3cf7a898af3c\",\"name\":\"author\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8165c636fd999eac3818e556a4b3190c37b229ed36746c9952e8e616b4050e4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8165c636fd999eac3818e556a4b3190c37b229ed36746c9952e8e616b4050e4?s=96&d=mm&r=g\",\"caption\":\"author\"},\"sameAs\":[\"http:\/\/cbitss.in\/python-training-in-chandigarh\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How is Java platform independent? - CBitss Technologies","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/","og_locale":"en_US","og_type":"article","og_title":"How is Java platform independent? - CBitss Technologies","og_description":"The meaning of platform independent \u00a0is that, the java source code can keep running on every operating system. A program is written in a language which is a comprehensible \u00a0language. It might contain words, phrases and so forth which the machine does not understand it. For the source code to be known by the machine, [&hellip;]","og_url":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/","og_site_name":"CBitss Technologies","article_published_time":"2018-12-27T13:10:28+00:00","article_modified_time":"2019-01-19T08:03:47+00:00","og_image":[{"url":"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png","type":"","width":"","height":""}],"author":"author","twitter_card":"summary_large_image","twitter_misc":{"Written by":"author","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#article","isPartOf":{"@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/"},"author":{"name":"author","@id":"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/person\/9cb4eff9943da81bf79f3cf7a898af3c"},"headline":"How is Java platform independent?","datePublished":"2018-12-27T13:10:28+00:00","dateModified":"2019-01-19T08:03:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/"},"wordCount":528,"commentCount":0,"publisher":{"@id":"https:\/\/www.cbitss.co.in\/blog\/#organization"},"image":{"@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage"},"thumbnailUrl":"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/","url":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/","name":"How is Java platform independent? - CBitss Technologies","isPartOf":{"@id":"https:\/\/www.cbitss.co.in\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage"},"image":{"@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage"},"thumbnailUrl":"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png","datePublished":"2018-12-27T13:10:28+00:00","dateModified":"2019-01-19T08:03:47+00:00","breadcrumb":{"@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#primaryimage","url":"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png","contentUrl":"http:\/\/cbitss.co.in\/blog\/wp-content\/uploads\/2018\/12\/How-is-Java-platform-independent-300x169.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.cbitss.co.in\/blog\/how-is-java-platform-independent\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cbitss.co.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How is Java platform independent?"}]},{"@type":"WebSite","@id":"https:\/\/www.cbitss.co.in\/blog\/#website","url":"https:\/\/www.cbitss.co.in\/blog\/","name":"CBitss Technologies","description":"Knowledge | Experience | Information","publisher":{"@id":"https:\/\/www.cbitss.co.in\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cbitss.co.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.cbitss.co.in\/blog\/#organization","name":"CBitss Technologies","url":"https:\/\/www.cbitss.co.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2020\/08\/cropped-unnamed.png","contentUrl":"https:\/\/www.cbitss.co.in\/blog\/wp-content\/uploads\/2020\/08\/cropped-unnamed.png","width":500,"height":263,"caption":"CBitss Technologies"},"image":{"@id":"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/person\/9cb4eff9943da81bf79f3cf7a898af3c","name":"author","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cbitss.co.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8165c636fd999eac3818e556a4b3190c37b229ed36746c9952e8e616b4050e4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8165c636fd999eac3818e556a4b3190c37b229ed36746c9952e8e616b4050e4?s=96&d=mm&r=g","caption":"author"},"sameAs":["http:\/\/cbitss.in\/python-training-in-chandigarh\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":1,"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":179,"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/posts\/177\/revisions\/179"}],"wp:attachment":[{"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cbitss.co.in\/blog\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}