{"id":326,"date":"2009-02-02T17:39:22","date_gmt":"2009-02-02T22:39:22","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=326"},"modified":"2009-02-02T17:40:54","modified_gmt":"2009-02-02T22:40:54","slug":"multiple-jdk-on-windows","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=326","title":{"rendered":"Multiple JDK on Windows"},"content":{"rendered":"<p>If you installed multiple JDKs on windows, here is how to switch among them.<\/p>\n<p>*Create or modify JAVA_HOME environment variable and point it to the correct jdk home.<\/p>\n<pre>set JAVA_HOME=C:\\Program Files\\Java\\jdk1.5.0_14<\/PRE>\r\n*Add '%JAVA_HOME%\\bin' to the <strong>beginning<\/strong> of the PATH environment variable.\r\n<pre>set PATH=%JAVA_HOME%\\bin;%PATH%<\/pre>\n<p>*Check correct jdk is now configured by executing DOS command 'java -version'. Make sure that the DOS window is NOT in 'C:\\WINDOWS\\system32>' since later versions of JDK installation will copy their java executables to that directory so executing 'java -version' in 'C:\\WINDOWS\\system32>' will always show the version of that java executable.<\/p>\n<pre lang=\"xml\">\r\nC:\\WINDOWS\\system32>cd \\\r\n\r\nC:\\>java -version\r\njava version \"1.5.0_14\"\r\nJava(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)\r\nJava HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you installed multiple JDKs on windows, here is how to switch among them. *Create or modify JAVA_HOME environment variable and point it to the correct jdk home. set JAVA_HOME=C:\\Program Files\\Java\\jdk1.5.0_14 *Add &#8216;%JAVA_HOME%\\bin&#8217; to the beginning of the PATH environment &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=326\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[14,10],"tags":[],"class_list":["post-326","post","type-post","status-publish","format-standard","hentry","category-java","category-winos"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-5g","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326"}],"version-history":[{"count":2,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/326\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}