{"id":293974,"date":"2024-10-27T04:02:43","date_gmt":"2024-10-26T20:02:43","guid":{"rendered":"https:\/\/lrxjmw.cn\/jzlzcxzwlmwt.html"},"modified":"2024-10-27T04:02:43","modified_gmt":"2024-10-26T20:02:43","slug":"jzlzcxzwlmwt","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/jzlzcxzwlmwt.html","title":{"rendered":"Java \u5728 Linux \u4e2d\u51fa\u73b0\u4e2d\u6587\u4e71\u7801\u95ee\u9898\u600e\u4e48\u529e\uff1f"},"content":{"rendered":"

Java\u5728linux\u82f1\u6587\u4e71\u7801\u95ee\u9898\u662f\u54ea\u4e9b\uff1f<\/p>\n

\u901a\u8fc7\u5c06cmd\u7f16\u7801\u683c\u5f0f\u8c03\u6362\u6210GBK\uff0c\u8bb0\u4e8b\u672c\u53e6\u5b58\u4e3a\u7f16\u7801\u683c\u5f0f\u4e3aANSI,\u5728cmd\u4e2d\u8fd0\u884cjavac\u548cjava\u6587\u4ef6\u4e0d\u4f1a\u51fa\u73b0\u4ee5\u4e0a\u7684\u95ee\u9898\uff0c\u4e0d\u4f1a\u4e71\u7801\uff0c\u4e5f\u624d\u80fd\u6b63\u5e38\u8fd0\u884c\u3002\u5e76\u4e14\u6362\u6210UTF-8\u90fd\u4f1a\u4e71\u7801\u548c\u8fd0\u884c\u51fa\u95ee\u9898<\/p>\n

linux\u89e3\u51b3\u4e71\u7801\u547d\u4ee4_linux\u4e2d\u6587\u4e71\u7801\u4e0d\u91cd\u542f\u7cfb\u7edf_linux \u547d\u4ee4\u4e2d\u6587\u4e71\u7801<\/p>\n

\uff08\u56fe\u7247\u6765\u6e90\u7f51\u8def\uff0c\u4fb5\u5220\uff09<\/p>\n

java\u8bfb\u53d6\u6587\u4ef6\u6d41\u4e71\u7801\u8f93\u51fa\u4e71\u7801\uff1f<\/p>\n

\u5047\u5982\u4f60\u5168\u662f\u82f1\u6587\u7684\u8bdd\uff0c\u82f1\u6587\u662f\u4e24\u4e2a\u5b57\u8282linux \u547d\u4ee4<\/a>\u4e2d\u6587\u4e71\u7801<\/strong>\uff0c\u8fd9\u4e48\u53ef\u4ee5\u91c7\u7528\u4e24\u4e2a\u5b57\u8282\u4e00\u8d77\u8bfb\uff0c\u5047\u5982\u4f60\u4e2d\u82f1\u6587\u4ea4\u53c9\u7684\u6587\u672c\uff0c\u90a3\u5c31\u4e0d\u597d\u529e\u4e86\uff0c\u53ea\u80fd\u628a\u6587\u672c\u4e00\u6b21\u6027\u5168\u90fd\u8bfb\u8fdb\u6765\u518d\u8f93\u51fa\u3002\u7eaf\u82f1\u6587\u8bfb\u53d6\uff1aFilef1=newFile(\"a.txt\");FileInputStreamis=newFileInputStream(f1);inti;byte[]b=newbyte[2];while((i=is.read(b))!=-1){System.out.print(newString(b));}\u4e2d\u82f1\u6587\u6df7\u548c\u7684\u6587\u672c\u8bfb\u53d6byte[]b=newbyte[yourtxtlength];yourtxtlength\u5c31\u662f\u4f60\u6587\u672c\u5b57\u8282\u7684\u5bbd\u5ea6<\/p>\n

linux\u89e3\u51b3\u4e71\u7801\u547d\u4ee4_linux\u4e2d\u6587\u4e71\u7801\u4e0d\u91cd\u542f\u7cfb\u7edf_linux \u547d\u4ee4\u4e2d\u6587\u4e71\u7801<\/p>\n

myEclipse\uff0cEclipse\u5bfc\u51fa\u9879\u76ee\u82f1\u6587\u4e71\u7801\u5982\u4f55\u89e3\u51b3\uff1f<\/p>\n

\u89e3\u51b3\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n

1\u3001\u9996\u5148\u5728\u8f6f\u4ef6\u4e2dlinux \u547d\u4ee4\u4e2d\u6587\u4e71\u7801<\/strong>linux\u865a\u62df\u673a\uff0c\u53f3\u952e\u51fa\u73b0\u82f1\u6587\u4e71\u7801\u7684java\u9879\u76ee\u540d\uff0c\u5728\u53f3\u952e\u83dc\u5355\u4e2d\u9009\u62e9\u6700\u540e\u4e00\u9879Properties\u3002<\/p>\n

linux \u547d\u4ee4\u4e2d\u6587\u4e71\u7801_linux\u4e2d\u6587\u4e71\u7801\u4e0d\u91cd\u542f\u7cfb\u7edf_linux\u89e3\u51b3\u4e71\u7801\u547d\u4ee4<\/p>\n

\uff08\u56fe\u7247\u6765\u6e90\u7f51\u8def\uff0c\u4fb5\u5220\uff09<\/p>\n

2\u3001\u70b9\u51fb\u3010Properties\u3011\uff0c\u5728\u5f39\u51fa\u7a97\u53e3\u9009\u62e9Resource\u9009\u9879\uff0c\u4e4b\u540e\u5728\u5de6\u4fa7\u64cd\u4f5c\u7a97\u53e3\u4e2d\u7684\u7b2c\u4e00\u9879\u9009\u62e9other\u9009\u9879\u3002<\/p>\n

linux\u89e3\u51b3\u4e71\u7801\u547d\u4ee4_linux \u547d\u4ee4\u4e2d\u6587\u4e71\u7801_linux\u4e2d\u6587\u4e71\u7801\u4e0d\u91cd\u542f\u7cfb\u7edf<\/p>\n

3\u3001\u5728\u9009\u9879\u4e00\u4fa7\u4e0b\u62c9\u9009\u62e9\u4e2d\u70b9\u9009\u5408\u9002\u7684\u7f16\u7801\u683c\u5f0flinux\u6807\u51c6\u6559\u7a0b\uff0c\u5047\u5982\u6653\u5f97\u5bfc\u51fa\u9879\u76ee\u7684\u4f7f\u7528\u4e86\u54ea\u4e9b\u7f16\u7801\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u9009\u62e9utf-8\uff0c\u4e4b\u540e\u786e\u5b9aAppleandclose\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n

4\u3001\u4e5f\u53ef\u4ee5\u5728\u529f\u80fd\u83dc\u5355\u9009\u62e9project\uff0c\u4e4b\u540e\u9009\u62e9\u6700\u540e\u4e00\u4e2a\u9009\u9879Properties\u3002<\/p>\n

Java\u5728linux\u4e2d\u6587\u4e71\u7801\u95ee\u9898\u662f\u4ec0\u4e48\uff1f\uff08\u4e2d\u6587\u4e71\u7801java\u600e\u4e48\u89e3\u51b3\uff09<\/p>\n

linux\u89e3\u51b3\u4e71\u7801\u547d\u4ee4_linux\u4e2d\u6587\u4e71\u7801\u4e0d\u91cd\u542f\u7cfb\u7edf_linux \u547d\u4ee4\u4e2d\u6587\u4e71\u7801<\/p>\n

\uff08\u56fe\u7247\u6765\u6e90\u7f51\u8def\uff0c\u4fb5\u5220\uff09<\/p>\n

5\u3001\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u82f1\u6587\u4e71\u7801\u5c31\u89e3\u51b3\u4e86\u3002<\/p>\n

\u5230\u6b64\uff0c\u4ee5\u4e0a\u5c31\u662f\u5c0f\u7f16\u5bf9\u4e8e\u82f1\u6587\u4e71\u7801java\u5982\u4f55\u89e3\u51b3\u95ee\u9898\u7684\u95ee\u9898\u5c31\u4ecb\u7ecd\u5230\u8fd9\u4e86\uff0c\u5e0c\u671b\u8fd93\u70b9\u89e3\u7b54\u5bf9\u4f60\u4eec\u6709\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Java\u5728linux\u4e2d\u6587\u4e71\u7801\u95ee\u9898\u662f\u4ec0\u4e48\uff1fjava\u8bfb\u53d6\u6587\u4ef6\u6d41\u4e71\u7801\u8f93\u51fa\u4e71\u7801\uff1fmyEclipse\uff0cEclipse\u5bfc\u5165\u9879\u76ee\u4e2d\u6587\u4e71\u7801\u600e\u4e48\u89e3\u51b3\uff1f1\u3001\u9996\u5148\u5728\u8f6f\u4ef6\u4e2d\uff0c\u53f3\u952e\u51fa\u73b0\u4e2d\u6587\u4e71\u7801\u7684java\u9879\u76ee\u540d\uff0c\u5728\u53f3\u952e\u83dc\u5355\u4e2d\u9009\u62e9\u6700\u540e\u4e00\u9879Properties\u30025\u3001\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u4e2d\u6587\u4e71\u7801\u5c31\u89e3\u51b3\u4e86\u3002<\/p>\n","protected":false},"author":1,"featured_media":293975,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[3872,3871,3874,3875,3873],"class_list":["post-293974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-cbmgs","tag-jlmjj","tag-jwjyx","tag-zwlm","tag-jsbbmgs"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/293974","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=293974"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/293974\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/293975"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=293974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=293974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=293974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}