linux\u914d\u7f6ejdk\u73af\u5883<\/strong>\uff0c\u73af\u5883\u53c2\u6570\u8c03\u6574\u5b8c\u6bd5\u3002\u901a\u8fc7\u6267\u884c\u547d\u4ee4java -version\u5373\u53ef\u786e\u8ba4JDK\u7684\u5b89\u88c5\u60c5\u51b5\u548c\u914d\u7f6e\u786e\u8ba4\u65e0\u95ee\u9898\u3002<\/p>\n4.\u914d\u7f6e\u5176\u4ed6\u76f8\u5173\u73af\u5883\u53d8\u91cf<\/b><\/p>\n
<\/p>\n
\u5728\u7279\u5b9a\u5f00\u53d1\u5de5\u5177\u548c\u6846\u67b6\u7684\u8fd0\u884c\u4e2d\uff0c\u9664\u4e86 Java_Home \u548c Path \u8fd9\u4e24\u4e2a\u57fa\u672c\u73af\u5883\u53d8\u91cf\u4e4b\u5916linux site:infoq.cn\uff0c\u8fd8\u6709\u5fc5\u8981\u8bbe\u7f6e\u66f4\u591a\u7684\u73af\u5883\u53d8\u91cf\u6765\u6ee1\u8db3\u9700\u8981\u3002\u4f8b\u5982\uff0c\u4f7f\u7528 Maven \u65f6\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u5b9a MAVEN_HOME\uff0c\u540c\u65f6\u8fd8\u5e94\u786e\u4fdd\u5b83\u7684 bin \u5b50\u6587\u4ef6\u5939\u88ab\u6536\u5165 Path\uff1b\u5982\u679c\u6d89\u53ca\u5230 Tom cat \u670d\u52a1\u5668\u7684\u914d\u7f6e\uff0c\u90a3\u5c31\u5f97\u786e\u5b9a CATALINA_HOME \u7684\u503c\u4e86\u3002<\/p>\n
\u6839\u636e\u5b9e\u9645\u548c\u9879\u76ee\u9700\u6c42\u7684\u53d8\u5316\uff0c\u6211\u4eec\u5e94\u5ba2\u89c2\u5730\u8c03\u6574\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4ee5\u7ef4\u7cfb\u9879\u76ee\u7684\u7a33\u5b9a\u8fd0\u884c\u53ca\u63d0\u5347\u7814\u53d1\u6548\u7387\u3002<\/p>\n
5.\u9a8c\u8bc1\u914d\u7f6e<\/b><\/p>\n
\u786e\u8ba4\u914d\u7f6e\u6b63\u786e\u6027\uff0c\u53ef\u4ee5\u4f7f\u7528ksh\u6216cmd\u7ec8\u7aef\u8f93\u5165\"java -version\"\u548c\"javac -version\"\u6765\u67e5\u770b\u5e76\u9a8c\u8bc1Java\u8fd0\u884c\u73af\u5883\u4e0e\u7f16\u8bd1\u5668\u7684\u7248\u672c\u4fe1\u606f\u3002\u82e5\u90fd\u80fd\u83b7\u53d6\u5230\u7248\u672c\u8baf\u606f\uff0c\u8868\u793a\u6210\u529f\u6784\u5efa\u4e86JDK\u73af\u5883\u3002<\/p>\n
\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u4f1a\u91c7\u7528\u7b80\u7ea6\u7684\"Hello World\"\u7a0b\u5e8f\u6765\u68c0\u67e5\u548c\u786e\u8ba4\u5f00\u53d1\u73af\u5883\u7684\u7a33\u5b9a\u6027\u4e0e\u53ef\u9760\u6027\uff0c\u540c\u65f6\u719f\u6089\u5e76\u638c\u63e1Java\u5f00\u53d1\u5de5\u5177\u7684\u5404\u9879\u529f\u80fd\u3002<\/p>\n
<\/p>\n
6.\u66f4\u65b0\u548c\u5347\u7ea7<\/b><\/p>\n
\u4fdd\u6301\u9891\u7e41\u66f4\u65b0\u7684Java Development Kit\uff08JDK\uff09\u7248\u672c\u81f3\u5173\u91cd\u8981\uff0c\u8fd9\u662f\u56e0\u4e3a\u65b0\u7248\u672c\u53ef\u4ee5\u8fc5\u901f\u4fee\u590d\u6f0f\u6d1e\u5e76\u4e14\u589e\u5f3a\u529f\u80fd\u53ca\u6027\u80fd\u3002\u53ca\u65f6\u66f4\u65b0\u81f3\u6700\u65b0\u7248\uff0c\u80fd\u786e\u4fdd\u6211\u4eec\u7d27\u8ddf\u6280\u672f\u524d\u6cbf\uff0c\u89c4\u907f\u6f5c\u5728\u95ee\u9898\u3002<\/p>\n
\u8bf7\u60a8\u5728\u4e0b\u8f7d\u5e76\u8fd0\u884c\u5168\u65b0\u7684JDK\u5b89\u88c5\u7a0b\u5e8f\u66f4\u9ad8\u7ea7\u522b\u540e\uff0c\u5bf9\u73b0\u6709\u73af\u5883\u8fdb\u884c\u59a5\u5f53\u7684\u5347\u7ea7\u3002\u5728\u5f00\u59cb\u6b64\u6b65\u9aa4\u524d\uff0c\u8bf7\u786e\u4fdd\u5df2\u7ecf\u4e3a\u539f\u6709\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u4e86\u5907\u4efd\uff0c\u4ee5\u9632\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u5bfc\u81f4\u6574\u4e2a\u5f00\u53d1\u73af\u5883\u7684\u762b\u75ea\u3002<\/p>\n
7.\u6545\u969c\u6392\u9664\u4e0e\u5e38\u89c1\u95ee\u9898<\/b><\/p>\n
\u5728\u6784\u5efaJDK\u73af\u5883\u65f6\uff0c\u53ef\u80fd\u4f1a\u78b0\u5230\"Java\u65e0\u6cd5\u8bc6\u522b\"\u6216\"JAVA_HOME\u672a\u88ab\u53d1\u73b0\"\u7b49\u95ee\u9898\u3002\u6b64\u65f6\uff0c\u5fc5\u987b\u4ed4\u7ec6\u5730\u8fdb\u884c\u6392\u67e5\u548c\u9010\u4e00\u89e3\u51b3\u76f8\u5173\u95ee\u9898\u3002<\/p>\n
<\/p>\n
\u8bf8\u591a\u5e38\u89c1\u95ee\u9898\u6e90\u4e8e\u8bbe\u7f6e\u4e0d\u5f53\u8def\u5f84\u3001\u6743\u9650\u5206\u5de5\u4e0d\u6e05\u3001\u8f6f\u4ef6\u7248\u672c\u4e0d\u5339\u914d\u7b49\u56e0\u7d20\u3002\u901a\u8fc7\u67e5\u770b\u7cfb\u7edf\u65e5\u5fd7\u5e76\u4fee\u6b63\u9519\u8bef\u4fe1\u606f\uff0c\u501f\u9274\u4e92\u8054\u7f51\u7c7b\u4f3c\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u80fd\u52a9\u4f60\u8fc5\u901f\u6392\u9664\u6545\u969c\u5e76\u5b8c\u6210\u9ad8\u6548\u914d\u7f6e\u3002<\/p>\n
8.\u603b\u7ed3<\/b><\/p>\n
\u7ecf\u8fc7\u7cbe\u5fc3\u89e3\u8bfb\u548c\u793a\u8303\u6027\u7684\u6307\u5bfc\uff0c\u76f8\u4fe1\u60a8\u5df2\u7ecf\u66f4\u52a0\u6df1\u5165\u5730\u7406\u89e3\u4e86\u5982\u4f55\u5728Linux\u73af\u5883\u4e0b\u642d\u5efa\u9002\u5408\u7684JDK\u73af\u5883\u3002\u4f5c\u4e3a\u4e13\u6ce8\u4e8eJava\u5f00\u53d1\u7684\u4e1a\u5185\u4eba\u58eb\uff0c\u5408\u7406\u914d\u7f6eJDK\u73af\u5883\u65e0\u7591\u662f\u5173\u952e\u4e2d\u7684\u5173\u952e\uff0c\u5728\u5b9e\u9645\u4e1a\u52a1\u9879\u76ee\u4e2d\uff0c\u8fd9\u4e00\u70b9\u7684\u4f5c\u7528\u66f4\u662f\u65e0\u53ef\u5339\u654c\u3002<\/p>\n
\u8bda\u631a\u9080\u8bf7\u5404\u4f4d\u6df1\u5165\u7814\u7a76\u548c\u5b9e\u9645\u64cd\u4f5cLinux\u7cfb\u7edf\u4ee5\u53cajava\u5f00\u53d1\u5de5\u5177\uff0c\u4ee5\u63d0\u5347\u60a8\u5bf9\u6b64\u7684\u7406\u89e3\u548c\u719f\u7ec3\u7a0b\u5ea6\u3002\u613f\u60a8\u6210\u4e3a\u6770\u51faJava\u5f00\u53d1\u8005\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"
\u7ecf\u8fc7\u89e3\u538b\u7f29\u4e4b\u540e\uff0c\u4fbf\u80fd\u5f97\u5230\u4e00\u4e2a\u540d\u4e3a\u201cjdk\u201d\u7684\u6587\u4ef6\u5939\uff0c\u5176\u5185\u90e8\u5305\u62ec\u5404\u79cdJava\u5f00\u53d1\u6240\u9700\u7684\u5de5\u5177\u548c\u8fd0\u884c\u65f6\u5e93\u7b49\u3002\u8bf7\u60a8\u5728\u4e0b\u8f7d\u5e76\u8fd0\u884c\u5168\u65b0\u7684JDK\u5b89\u88c5\u7a0b\u5e8f\u66f4\u9ad8\u7ea7\u522b\u540e\uff0c\u5bf9\u73b0\u6709\u73af\u5883\u8fdb\u884c\u59a5\u5f53\u7684\u5347\u7ea7\u3002\u5728\u5f00\u59cb\u6b64\u6b65\u9aa4\u524d\uff0c\u8bf7\u786e\u4fdd\u5df2\u7ecf\u4e3a\u539f\u6709\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u4e86\u5907\u4efd\uff0c\u4ee5\u9632\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\u5bfc\u81f4\u6574\u4e2a\u5f00\u53d1\u73af\u5883\u7684\u762b\u75ea\u3002<\/p>\n","protected":false},"author":1,"featured_media":290573,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-290572","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290572","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=290572"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290572\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/290573"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=290572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=290572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=290572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}