{"id":109618,"date":"2024-11-17T22:48:11","date_gmt":"2024-11-17T14:48:11","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=109618"},"modified":"2024-11-17T22:48:11","modified_gmt":"2024-11-17T14:48:11","slug":"ubuntu-install-jdk","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ubuntu-install-jdk.html","title":{"rendered":"Ubuntu\u4e4bjdk\u5b89\u88c5"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nJDK\u662f Java \u8bed\u8a00\u7684\u8f6f\u4ef6\u5f00\u53d1\u5de5\u5177\u5305\uff0c\u4e3b\u8981\u7528\u4e8e\u79fb\u52a8\u8bbe\u5907\u3001\u5d4c\u5165\u5f0f\u8bbe\u5907\u4e0a\u7684java\u5e94\u7528\u7a0b\u5e8f\u3002JDK\u662f\u6574\u4e2ajava\u5f00\u53d1\u7684\u6838\u5fc3\uff0c\u5b83\u5305\u542b\u4e86JAVA\u7684\u8fd0\u884c\u73af\u5883\uff08JVM+Java\u7cfb\u7edf\u7c7b\u5e93\uff09\u548cJAVA\u5de5\u5177\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
1.oracle\u5b98\u7f51\u4e0b\u8f7d\u538b\u7f29\u5305<\/strong><\/div>\n

\u70b9\u51fb\u94fe\u63a5<\/a><\/p>\n

\"\"<\/p>\n

2.\u89e3\u538b<\/strong><\/div>\n
 tar -zxvf jdk-8u171-linux-x64.tar.gz\r\n<\/pre>\n

\"\"<\/p>\n

3.\u79fb\u52a8\u5230\u5236\u5b9a\u76ee\u5f55<\/strong><\/div>\n

##\u5c06\u6587\u4ef6\u4ece\u4e0b\u8f7d\u76ee\u5f55 \u632a\u5230\/usr\/local\u4e0b<\/p>\n

sudo mv jdk1.8.0_171  \/usr\/local\/jdk1.8<\/pre>\n

\"\"<\/p>\n

4.\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/div>\n
vim \/etc\/profile<\/pre>\n

\u5728\u6587\u4ef6\u672b\u5c3e\u52a0\u5165<\/p>\n

export JAVA_HOME=\/usr\/local\/jdk1.8\r\nexport JRE_HOME=${JAVA_HOME}\/jre\r\nexport CLASSPATH=.:${JAVA_HOME}\/lib:${JRE_HOME}\/lib\r\nexport PATH=.:${JAVA_HOME}\/bin:$PATH\r\n<\/pre>\n

\"\"<\/p>\n

\u5982\u679c\u663e\u793a\u65e0\u6cd5\u4fdd\u5b58\u4fee\u6539\u547d\u4ee4<\/p>\n

sudo vim \/etc\/profile \r\n<\/pre>\n
5.\u4f7f\u914d\u7f6e\u751f\u6548<\/strong><\/div>\n
source \/etc\/profile \r\n<\/pre>\n

\"\"<\/p>\n

6.\u68c0\u67e5\u662f\u5426\u751f\u6548<\/strong><\/div>\n
java -version<\/pre>\n

\"\"<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/www.cnblogs.com\/luoli-\/p\/9247952.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/ubuntu-install-jdk.html<\/a>\u7f16\u8f91\uff1a\u51af\u745e\u6d9b\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb JDK\u662f Java \u8bed\u8a00\u7684\u8f6f\u4ef6\u5f00\u53d1\u5de5\u5177\u5305\uff0c\u4e3b\u8981\u7528\u4e8e\u79fb\u52a8\u8bbe\u5907\u3001\u5d4c\u5165\u5f0f\u8bbe\u5907\u4e0a\u7684java\u5e94\u7528\u7a0b\u5e8f\u3002JDK\u662f\u6574\u4e2a […]<\/p>\n","protected":false},"author":1329,"featured_media":109920,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-109618","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/109618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1329"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=109618"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/109618\/revisions"}],"predecessor-version":[{"id":110021,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/109618\/revisions\/110021"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/109920"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=109618"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=109618"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=109618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}