{"id":38473,"date":"2024-11-26T10:58:01","date_gmt":"2024-11-26T02:58:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/38473\/"},"modified":"2024-11-26T10:58:01","modified_gmt":"2024-11-26T02:58:01","slug":"%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85java%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/38473\/","title":{"rendered":"\u600e\u4e48\u5b89\u88c5java\u6587\u4ef6"},"content":{"rendered":"<blockquote><p>\n  \u6709\u4e09\u79cd\u5b89\u88c5 java \u6587\u4ef6\u7684\u65b9\u6cd5\uff1a\u4f7f\u7528 java \u5b89\u88c5\u7a0b\u5e8f\uff08\u5b98\u65b9\u63a8\u8350\uff09\u901a\u8fc7\u547d\u4ee4\u884c\u5b89\u88c5\uff08\u9002\u7528\u4e8e linux \u548c macos\uff09\u8bbe\u7f6e java \u73af\u5883\u53d8\u91cf\uff08\u624b\u52a8\u914d\u7f6e\uff09\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202411\/15\/2024111502154827429.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u5b89\u88c5java\u6587\u4ef6\u63d2\u56fe\" alt=\"\u600e\u4e48\u5b89\u88c5java\u6587\u4ef6\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5b89\u88c5 Java \u6587\u4ef6<\/strong><\/p>\n<p><strong>\u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528 Java \u5b89\u88c5\u7a0b\u5e8f<\/strong><\/p>\n<ol>\n<li>\u4e0b\u8f7d Java \u5b89\u88c5\u7a0b\u5e8f\uff0c\u53ef\u5728 Oracle \u5b98\u7f51\u83b7\u53d6\u3002<\/li>\n<li>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u5e76\u6309\u7167\u63d0\u793a\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0cJava \u5c06\u88ab\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/li>\n<\/ol>\n<p><strong>\u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\u5b89\u88c5<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00\u547d\u4ee4\u884c\u3002<\/li>\n<li>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ol>\n<pre>sudo apt install default-jre  # \u9002\u7528\u4e8e Ubuntu \u548c Debian\nsudo yum install java-1.8.0-openjdk  # \u9002\u7528\u4e8e Fedora \u548c Red Hat\nbrew cask install java  # \u9002\u7528\u4e8e macOS<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u65b9\u6cd5\u4e09\uff1a\u8bbe\u7f6e Java \u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ol>\n<li>\u627e\u5230 Java \u5b89\u88c5\u76ee\u5f55\uff08\u901a\u5e38\u4f4d\u4e8e \/usr\/lib\/jvm\/java-version\uff09\u3002<\/li>\n<li>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u4f4d\u4e8e \/etc\/environment\uff09\u3002<\/li>\n<li>\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/li>\n<\/ol>\n<pre>JAVA_HOME=\/usr\/lib\/jvm\/java-version\nPATH=$PATH:$JAVA_HOME\/bin<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<p>\u8981\u9a8c\u8bc1 Java \u662f\u5426\u5df2\u6210\u529f\u5b89\u88c5\uff0c\u8bf7\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>java -version<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u663e\u793a Java \u7248\u672c\uff0c\u5219\u8868\u793a\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u5b89\u88c5java\u6587\u4ef6\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4e09\u79cd\u5b89\u88c5 java \u6587\u4ef6\u7684\u65b9\u6cd5\uff1a\u4f7f\u7528 java \u5b89\u88c5\u7a0b\u5e8f\uff08\u5b98\u65b9\u63a8\u8350\uff09\u901a\u8fc7\u547d\u4ee4\u884c\u5b89\u88c5\uff08\u9002\u7528\u4e8e linux \u548c macos\uff09\u8bbe\u7f6e java \u73af\u5883\u53d8\u91cf\uff08\u624b\u52a8\u914d\u7f6e\uff09 \u5982\u4f55\u5b89\u88c5 Java \u6587\u4ef6 \u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528 Java \u5b89\u88c5\u7a0b\u5e8f \u4e0b\u8f7d Java \u5b89\u88c5\u7a0b\u5e8f\uff0c\u53ef\u5728 Oracle \u5b98\u7f51\u83b7\u53d6\u3002 \u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u5e76\u6309\u7167\u63d0\u793a\u8fdb\u884c\u64cd\u4f5c\u3002 \u5b89\u88c5\u5b8c\u6210\u540e\uff0cJava \u5c06\u88ab\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002 \u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\u5b89\u88c5 \u6253\u5f00\u547d\u4ee4\u884c\u3002 \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a sudo apt install default-jre # \u9002\u7528\u4e8e Ubuntu \u548c Debian sudo yum install java-1.8.0-openjdk # \u9002\u7528\u4e8e Fedora \u548c Red Hat brew cask install java # \u9002\u7528\u4e8e macOS \u767b\u5f55\u540e\u590d\u5236 \u65b9\u6cd5\u4e09\uff1a\u8bbe\u7f6e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-38473","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/38473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=38473"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/38473\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=38473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=38473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=38473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}