{"id":295141,"date":"2024-12-23T12:09:56","date_gmt":"2024-12-23T04:09:56","guid":{"rendered":"https:\/\/lrxjmw.cn\/rhzlxtzxxazh.html"},"modified":"2024-12-23T12:09:56","modified_gmt":"2024-12-23T04:09:56","slug":"rhzlxtzxxazh","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rhzlxtzxxazh.html","title":{"rendered":"\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u8be6\u7ec6\u5b89\u88c5\u548c\u8fd0\u884cJava\u5e94\u7528\u7a0b\u5e8f\u7684\u5173\u952e\u6b65\u9aa4\u6307\u5357"},"content":{"rendered":"

\u5728Linux<\/a>\u7cfb\u7edf\u4e2d\u6267\u884cJava<\/a>\u5e94\u7528\u5e76\u4e0d\u590d\u6742\uff0c\u7136\u800c\u4ecd\u6709\u8bb8\u591a\u7ec6\u8282\u9700\u8981\u7559\u610f\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u9610\u8ff0\u5728Linux<\/a>\u73af\u5883\u4e0b\u8fd0\u884cJava\u7a0b\u5e8f\u7684\u5173\u952e\u70b9\u3002<\/p>\n

\u5b89\u88c5Java\u73af\u5883<\/b><\/p>\n

\u9996\u5148\u6211\u4eec\u8981\u660e\u786e\u4e00\u70b9\uff0c\u82e5\u6ca1\u6709Java\u8fd0\u884c\u73af\u5883\uff0c\u6267\u884cJava\u7a0b\u5e8f\u5c31\u65e0\u4ece\u4e0b\u624b\u3002\u5728Linux\u7cfb\u7edf\u91cc\uff0c\u6211\u4eec\u4e00\u822c\u9700\u8981\u5b89\u88c5JDK\u3002\u5b89\u88c5JDK\u7684\u65b9\u6cd5\u6709\u591a\u79cd\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u8bbf\u95ee\u5b98\u7f51\u4e0b\u8f7d\u5bf9\u5e94\u7248\u672c\u7684JDK\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u6211\u4eec\u5f97\u5230\u7684\u662f\u5b98\u65b9\u4e14\u7a33\u5b9a\u7684\u7248\u672c\u3002\u4f46\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u6211\u4eec\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u6bd4\u5982\u628aJDK\u7684bin\u76ee\u5f55\u8def\u5f84\u52a0\u5165\u5230\u7cfb\u7edf\u7684PATH\u53d8\u91cf\u91cc\u3002\u53e6\u5916\uff0c\u5f88\u591aLinux\u53d1\u884c\u7248\u90fd\u914d\u5907\u4e86\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5b83\u8f7b\u677e\u5b89\u88c5JDK\u3002\u4e0d\u8fc7\uff0c\u8fd9\u4e9b\u5305\u7ba1\u7406\u7cfb\u7edf\u91cc\u7684JDK\u53ef\u80fd\u5e76\u975e\u6700\u65b0\u7248\u3002<\/p>\n

\u7a0b\u5e8f\u8fd0\u884c\u5feb\u6377\u952e_\u7a0b\u5e8f\u8fd0\u884c\u51fa\u73b0Aborted_linux \u8fd0\u884cjava\u7a0b\u5e8f<\/p>\n

\u63a5\u4e0b\u6765\u8981\u68c0\u67e5\u5b89\u88c5\u662f\u5426\u987a\u5229\u3002\u5728\u7ec8\u7aef\u8f93\u5165\u547d\u4ee4<\/a>\u201cjava -version\u201d\uff0c\u67e5\u770bJava\u7248\u672c\u53f7\u3002\u82e5\u7248\u672c\u53f7\u80fd\u6b63\u786e\u663e\u793a\uff0c\u90a3\u5c31\u610f\u5473\u7740\u5b89\u88c5\u5df2\u7ecf\u6210\u529f\u3002<\/p>\n

\u7f16\u5199\u7b80\u5355\u7684Java\u7a0b\u5e8f<\/b><\/p>\n

\u8981\u5728Linux\u7cfb\u7edf\u4e0a\u6267\u884cJava\u5e94\u7528\u7a0b\u5e8f\uff0c\u9996\u5148\u5fc5\u987b\u62e5\u6709Java\u7a0b\u5e8f\u3002\u638c\u63e1Java\u7f16\u7a0b\u662f\u5165\u95e8\u7684\u5173\u952e\u3002\u5728\u5f00\u53d1\u73af\u5883\u4e2d\uff0c\u6211\u4eec\u4f9d\u636eJava\u7684\u8bed\u6cd5\u8fdb\u884c\u4ee3\u7801\u7f16\u5199\u3002\u4f8b\u5982\uff0c\u4ece\u7b80\u5355\u7684Hello World\u7a0b\u5e8f\u5f00\u59cb\u3002\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u4ee5.java\u7ed3\u5c3e\u7684\u6587\u672c\u6587\u4ef6\uff0c\u5e76\u5728\u5176\u4e2d\u8f93\u5165\u4ee3\u7801\u3002\u8fd9\u4e00\u6b65\u9aa4\u5fc5\u987b\u4e25\u683c\u4f9d\u7167Java\u7684\u8bed\u6cd5\u8981\u6c42linux \u8fd0\u884cjava\u7a0b\u5e8f<\/strong>\uff0c\u6bd4\u5982\u7c7b\u5b9a\u4e49\u3001\u4e3b\u51fd\u6570\u7b49\u3002<\/p>\n

\u7a0b\u5e8f\u8fd0\u884c\u51fa\u73b0Aborted_linux \u8fd0\u884cjava\u7a0b\u5e8f_\u7a0b\u5e8f\u8fd0\u884c\u5feb\u6377\u952e<\/p>\n

\u7f16\u5199\u590d\u6742\u7684Java\u7a0b\u5e8f\u65f6\uff0c\u5e38\u5e38\u9700\u8981\u5f15\u7528\u591a\u4e2a\u7c7b\u548c\u5305\u3002\u56e0\u6b64\uff0c\u5408\u7406\u7ec4\u7ec7\u4ee3\u7801\u7ed3\u6784\u663e\u5f97\u5c24\u4e3a\u5173\u952e\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u628a\u5177\u6709\u4e0d\u540c\u529f\u80fd\u7684\u7c7b\u5206\u95e8\u522b\u7c7b\u5730\u653e\u5165\u4e0d\u540c\u7684\u5305\u91cc\uff0c\u8fd9\u6837\u505a\u53ef\u4ee5\u8ba9\u4ee3\u7801\u7ed3\u6784\u66f4\u52a0\u660e\u6717\uff0c\u4fbf\u4e8e\u7ba1\u7406\u548c\u672a\u6765\u7684\u6269\u5c55\u3002<\/p>\n

\u7f16\u8bd1Java\u7a0b\u5e8f<\/b><\/p>\n

\u5b8c\u6210Java\u4ee3\u7801\u7f16\u5199\u540e\uff0c\u9700\u5c06\u5176\u8f6c\u6362\u6210\u5b57\u8282\u7801\u3002\u8fd9\u4e00\u8fc7\u7a0b\u662fLinux\u73af\u5883\u4e0b\u6267\u884cJava\u7a0b\u5e8f\u7684\u524d\u63d0\u6761\u4ef6\u3002\u6211\u4eec\u901a\u8fc7\u6267\u884c\u201cjavac\u201d\u6307\u4ee4\u6765\u5b8c\u6210\u7f16\u8bd1\u3002\u82e5\u6e90\u6587\u4ef6\u7b80\u5355linux \u8fd0\u884cjava\u7a0b\u5e8f<\/strong>\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u8f93\u5165\u201cjavac \u6587\u4ef6\u540d.java\u201d\u3002\u6bd4\u5982\uff0c\u82e5\u6587\u4ef6\u540d\u4e3aTest.javalinux\u670d\u52a1\u5668\u7ef4\u62a4\uff0c\u5219\u8f93\u5165\u201cjavac Test.java\u201d\u3002<\/p>\n

linux \u8fd0\u884cjava\u7a0b\u5e8f_\u7a0b\u5e8f\u8fd0\u884c\u51fa\u73b0Aborted_\u7a0b\u5e8f\u8fd0\u884c\u5feb\u6377\u952e<\/p>\n

\u7f16\u8bd1\u65f6\u53ef\u80fd\u4f1a\u53d1\u73b0\u8bed\u6cd5\u4e0a\u7684\u95ee\u9898\u3002\u4e00\u65e6\u53d1\u73b0\u9519\u8bef\uff0c\u5f97\u8ba4\u771f\u68c0\u67e5\u547d\u4ee4\u884c\u663e\u793a\u7684\u9519\u8bef\u4fe1\u606f\u3002\u8fd9\u4e9b\u4fe1\u606f\u4e00\u822c\u80fd\u7cbe\u786e\u6307\u51fa\u95ee\u9898\u70b9\uff0c\u6bd4\u5982\u4ee3\u7801\u67d0\u884c\u9057\u6f0f\u4e86\u5206\u53f7\u6216\u62ec\u53f7\u6ca1\u5bf9\u9f50\u7b49\u3002\u6839\u636e\u8fd9\u4e9b\u63d0\u793a\u8fdb\u884c\u4fee\u6b63\uff0c\u7136\u540e\u518d\u8fdb\u884c\u7f16\u8bd1\u3002<\/p>\n

\u8fd0\u884cJava\u7a0b\u5e8f<\/b><\/p>\n

\u7f16\u8bd1\u5b8c\u6210\u540e\uff0cJava\u7a0b\u5e8f\u4fbf\u53ef\u6267\u884c\u3002\u8fd0\u884c\u65f6\uff0c\u9700\u501f\u52a9java\u6307\u4ee4\u6267\u884c\u7f16\u8bd1\u751f\u6210\u7684\u5b57\u8282\u7801\u3002\u82e5\u751f\u6210\u7684\u5b57\u8282\u7801\u6587\u4ef6\u540d\u4e3aMain.class\uff08\u5047\u5b9a\u4e3b\u7c7b\u540d\u4e3aMain\uff09\uff0c\u90a3\u4e48\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cjava Main\u201d\u5c31\u80fd\u542f\u52a8\u7a0b\u5e8f\u3002\u987b\u7559\u610f\uff0c\u6267\u884c\u65f6\u65e0\u9700\u5728\u6587\u4ef6\u540d\u540e\u52a0\u4e0a.class\u6269\u5c55\u540d\u3002<\/p>\n

\u82e5Java\u7a0b\u5e8f\u9700\u8981\u8c03\u7528\u5176\u4ed6\u7c7b\u5e93\u6216\u8d44\u6e90\uff0c\u5fc5\u987b\u4fdd\u8bc1\u8fd9\u4e9b\u8d44\u6e90\u5728\u8fd0\u884c\u65f6\u80fd\u591f\u51c6\u786e\u52a0\u8f7d\u3002\u6709\u65f6\uff0c\u8fd8\u9700\u8bbe\u5b9a\u7c7b\u8def\u5f84\uff0c\u4ee5\u660e\u786e\u6307\u51fa\u8fd9\u4e9b\u7c7b\u5e93\u5b58\u653e\u7684\u5177\u4f53\u4f4d\u7f6e\u3002<\/p>\n

\u5904\u7406\u5e38\u89c1\u95ee\u9898<\/b><\/p>\n

\u7a0b\u5e8f\u8fd0\u884c\u51fa\u73b0Aborted_linux \u8fd0\u884cjava\u7a0b\u5e8f_\u7a0b\u5e8f\u8fd0\u884c\u5feb\u6377\u952e<\/p>\n

\u4f7f\u7528Linux\u7cfb\u7edf\u6267\u884cJava\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u53ef\u80fd\u4f1a\u906d\u9047\u4e00\u4e9b\u666e\u904d\u7684\u96be\u9898\u3002\u4f8b\u5982\uff0c\u9047\u5230\u6743\u9650\u4e0d\u8db3\u7684\u60c5\u51b5\u3002\u5f53\u7f16\u8bd1\u6216\u8fd0\u884c\u6307\u4ee4\u65f6\uff0c\u82e5\u7cfb\u7edf\u63d0\u793a\u6743\u9650\u4e0d\u8db3\uff0c\u6211\u4eec\u4fbf\u9700\u8c03\u6574\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6267\u884c\u6743\u9650\u3002\u8fd9\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u201cchmod\u201d\u6307\u4ee4\u6765\u5904\u7406\u8fd9\u4e00\u72b6\u51b5\u3002<\/p>\n

\u6b64\u5916\uff0c\u8fd8\u6709\u5185\u5b58\u6ea2\u51fa\u7684\u98ce\u9669\uff0c\u8fd9\u79cd\u60c5\u51b5\u53ef\u80fd\u53d1\u751f\u5728Java\u7a0b\u5e8f\u5904\u7406\u5927\u91cf\u6570\u636e\u6216\u8d44\u6e90\u5206\u914d\u4e0d\u5f53\u7684\u65f6\u5019\u3002\u4e3a\u6b64\uff0c\u9700\u8981\u8c03\u6574JVM\u7684\u542f\u52a8\u53c2\u6570\uff0c\u6bd4\u5982\u589e\u5927\u5806\u5185\u5b58\u7b49\uff0c\u8fd9\u6837\u624d\u80fd\u63d0\u5347\u7a0b\u5e8f\u7684\u8fd0\u884c\u6027\u80fd\u3002<\/p>\n

\u4f18\u5316Java\u7a0b\u5e8f\u5728Linux\u4e0a\u7684\u8fd0\u884c<\/b><\/p>\n

\u7a0b\u5e8f\u8fd0\u884c\u5feb\u6377\u952e_\u7a0b\u5e8f\u8fd0\u884c\u51fa\u73b0Aborted_linux \u8fd0\u884cjava\u7a0b\u5e8f<\/p>\n

\u4e3a\u4e86\u4f7fJava\u7a0b\u5e8f\u5728Linux\u73af\u5883\u4e2d\u8fd0\u884c\u66f4\u4f73\uff0c\u5b58\u5728\u591a\u79cd\u4f18\u5316\u65b9\u6cd5\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u501f\u52a9Linux\u7684\u591a\u7ebf\u7a0b\u529f\u80fd\u6765\u589e\u5f3a\u7a0b\u5e8f\u7684\u5e76\u884c\u5904\u7406\u80fd\u529b\u3002\u82e5\u7a0b\u5e8f\u4e2d\u6d89\u53ca\u5927\u91cf\u8f93\u5165\u8f93\u51fa\u64cd\u4f5clinux\u547d\u4ee4\u884c\u548cshell\u811a\u672c\u7f16\u7a0b\u5b9d\u5178\uff0c\u91c7\u7528\u5f02\u6b65I\/O\u6280\u672f\u80fd\u663e\u8457\u63d0\u5347\u6548\u7387\u3002<\/p>\n

\u5728JVM\u5c42\u9762\uff0c\u9009\u7528\u6070\u5f53\u7684\u5783\u573e\u56de\u6536\u673a\u5236\uff0c\u6709\u52a9\u4e8e\u589e\u5f3a\u7a0b\u5e8f\u8fd0\u884c\u901f\u5ea6\u3002\u6bd4\u5982\uff0c\u9488\u5bf9\u90a3\u4e9b\u5185\u5b58\u5206\u914d\u8f83\u4e3a\u9891\u7e41\u7684\u5e94\u7528\uff0c\u91c7\u7528G1\u5783\u573e\u56de\u6536\u5668\uff0c\u53ef\u4ee5\u6709\u6548\u63d0\u5347\u5783\u573e\u56de\u6536\u7684\u901f\u5ea6\uff0c\u8fdb\u800c\u589e\u5f3a\u6574\u4f53\u6027\u80fd\u3002<\/p>\n

\u82e5\u4f60\u6253\u7b97\u5728Linux\u7cfb\u7edf\u4e2d\u987a\u7545\u6267\u884cJava\u5e94\u7528\uff0c\u6216\u8bb8\u66fe\u906d\u9047\u8fc7\u4e00\u4e9b\u72ec\u7279\u7684\u6311\u6218\uff1f\u4e0d\u59a8\u5728\u8bc4\u8bba\u533a\u7559\u4e0b\u4f60\u7684\u7ecf\u5386\uff0c\u540c\u65f6\u4e5f\u6b22\u8fce\u4f60\u4e3a\u8fd9\u7bc7\u6587\u7ae0\u70b9\u8d5e\u548c\u8f6c\u53d1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Linux\u7cfb\u7edf\u4e2d\u6267\u884cJava\u5e94\u7528\u5e76\u4e0d\u590d\u6742\uff0c\u7136\u800c\u4ecd\u6709\u8bb8\u591a\u7ec6\u8282\u9700\u8981\u7559\u610f\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u9610\u8ff0\u5728Linux\u73af\u5883\u4e0b\u8fd0\u884cJava\u7a0b\u5e8f\u7684\u5173\u952e\u70b9\u3002\u8981\u5728Linux\u7cfb\u7edf\u4e0a\u6267\u884cJava\u5e94\u7528\u7a0b\u5e8f\uff0c\u9996\u5148\u5fc5\u987b\u62e5\u6709Java\u7a0b\u5e8f\u3002\u4f7f\u7528Linux\u7cfb\u7edf\u6267\u884cJava\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u53ef\u80fd\u4f1a\u906d\u9047\u4e00\u4e9b\u666e\u904d\u7684\u96be\u9898\u3002<\/p>\n","protected":false},"author":1,"featured_media":295142,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[205,109,5125,3014,5124],"class_list":["post-295141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-java","tag-linux","tag-yhff","tag-azzn","tag-yxbz"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295141","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=295141"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295141\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/295142"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=295141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=295141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=295141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}