{"id":48,"date":"2011-09-27T23:51:17","date_gmt":"2011-09-27T23:51:17","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2011\/09\/27\/jdk-in-fedora-13-updated-for-the-jdk-6-0-64-bits\/"},"modified":"2011-09-27T23:51:17","modified_gmt":"2011-09-27T23:51:17","slug":"jdk-in-fedora-13-updated-for-the-jdk-6-0-64-bits","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=48","title":{"rendered":"JDK in Fedora 13 (Updated for the JDK 6.0 64 bits)"},"content":{"rendered":"<p>Once we have the installer in our local repository (as root):<\/p>\n<p><strong><em>chmod a+x \u00a0jdk-6u21-linux-x64-rpm.bin<\/em><\/strong><\/p>\n<p><strong><em>.\/jdk-6u21-linux-x64-rpm.bin<\/em><\/strong><\/p>\n<p><!--more--><br \/>\nOnce we have the installer in our local repository (as root):<\/p>\n<p><strong><em>chmod a+x \u00a0jdk-6u21-linux-x64-rpm.bin<\/em><\/strong><\/p>\n<p><strong><em>.\/jdk-6u21-linux-x64-rpm.bin<\/em><\/strong><\/p>\n<p><!--more-->Next, we must add these two lines to the file: \/etc\/profile<\/p>\n<p><strong><em>JAVA_HOME=\/usr\/java\/jdk1.6.0_21<\/em><\/strong><\/p>\n<p><strong><em>pathmunge $JAVA_HOME\/jre\/bin after<\/em><\/strong><\/p>\n<p>At the end of the line that starts with export, we need to add this our JAVA_HOME variable, so the line should be like this:<\/p>\n<p><strong><em>export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME<\/em><\/strong><\/p>\n<p>Then, we need to execute the next statements. Hint: Copy all the lines like if were just one.<\/p>\n<p><strong><em>export JAVA_HOME=\/usr\/java\/jdk1.6.0_21<\/em><\/strong><\/p>\n<p><strong><em>export JAVA_ALTERNATIVE_PRIORITY=16021<\/em><\/strong><\/p>\n<p><em><strong>\/usr\/sbin\/update-alternatives &#8211;install \/usr\/bin\/java java $JAVA_HOME\/bin\/java $JAVA_ALTERNATIVE_PRIORITY<\/strong><\/em><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;install \/usr\/bin\/javadoc javadoc $JAVA_HOME\/bin\/javadoc $JAVA_ALTERNATIVE_PRIORITY<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;install \/usr\/bin\/appletviewer appletviewer $JAVA_HOME\/bin\/appletviewer $JAVA_ALTERNATIVE_PRIORITY<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;install \/usr\/bin\/javah javah $JAVA_HOME\/bin\/javah $JAVA_ALTERNATIVE_PRIORITY<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;install \/usr\/bin\/javac javac $JAVA_HOME\/bin\/javac $JAVA_ALTERNATIVE_PRIORITY<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;install \/usr\/bin\/jar jar $JAVA_HOME\/bin\/jar $JAVA_ALTERNATIVE_PRIORITY<\/em><\/strong><\/p>\n<p>Then, we export the alternatives:<\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;auto java<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;auto javadoc<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;auto appletviewer<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;auto javah<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;auto javac<\/em><\/strong><\/p>\n<p><strong><em>\/usr\/sbin\/update-alternatives &#8211;auto jar<\/em><\/strong><\/p>\n<p>To confirm that our installation is successfull:<\/p>\n<p><em><strong>java -version<\/strong><\/em><\/p>\n<p>Should give us an ouptput like this:<\/p>\n<p>[root@yourMachine]# <strong><em>java -version<\/em><\/strong><\/p>\n<p>java version &#8220;1.6.0_21&#8221;<\/p>\n<p>Java(TM) SE Runtime Environment (build 1.6.0_21-b02)<\/p>\n<p>Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)<\/p>\n<p>That\u2019s it. Enjoy.<\/p>\n<p><a title=\"Credits\" href=\"http:\/\/wporta.wordpress.com\/2010\/07\/06\/installing-jdk-in-fedora-13\/\" target=\"_blank\" rel=\"noopener noreferrer\">Credits<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once we have the installer in our local repository (as root): chmod a+x \u00a0jdk-6u21-linux-x64-rpm.bin .\/jdk-6u21-linux-x64-rpm.bin<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-48","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=48"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/48\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}