{"id":40222,"date":"2025-11-04T12:17:48","date_gmt":"2025-11-04T04:17:48","guid":{"rendered":"https:\/\/app.60day.cn\/appday\/?p=40222"},"modified":"2025-11-04T12:17:48","modified_gmt":"2025-11-04T04:17:48","slug":"java%e8%83%bd%e7%94%9f%e6%88%90exe%e6%96%87%e4%bb%b6%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.60day.cn\/appday\/kaifaexe\/40222\/","title":{"rendered":"java\u80fd\u751f\u6210exe\u6587\u4ef6\u5417\uff1f"},"content":{"rendered":"<p>\u5f53\u7136\u53ef\u4ee5\uff01Java\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7\u4e00\u5b9a\u7684\u65b9\u6cd5\u751f\u6210\u53ef\u6267\u884c\u7684exe\u6587\u4ef6\u3002\u4e0b\u9762\u662f\u4f7f\u7528\u5f00\u6e90\u5de5\u5177\u8fdb\u884c\u751f\u6210exe\u6587\u4ef6\u7684\u539f\u7406\u548c\u8be6\u7ec6\u4ecb\u7ecd<a href=\"https:\/\/www.yimenexe.com\/ruanjian-kaifa-2519.html\">python\u751f\u6210exe\u9690\u85cf\u7a97\u53e3<\/a>\u3002<\/p>\n<p>### \u539f\u7406<\/p>\n<p>Java\u662f\u89e3\u91ca\u6027\u8bed\u8a00\uff0c\u5b83\u7684\u7a0b\u5e8f\u9700\u8981\u8fd0\u884c\u5728Java\u865a\u62df\u673a\uff08JVM\uff09\u4e0a\u3002\u6211\u4eec\u7f16\u5199\u7684Java\u4ee3\u7801\u9996\u5148\u7f16\u8bd1\u6210\u5b57\u8282\u7801\u6587\u4ef6\uff08.class\u6587\u4ef6\uff09\uff0c\u7136\u540e\u56e0\u4e3aexe\u6587\u4ef6\u662fWindows\u5e73\u53f0\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u6240\u4ee5\u4e3a\u4e86\u751f\u6210exe\u6587\u4ef6\uff0c\u9700\u8981\u5c06Jav<a href=\"https:\/\/exe.yimenapp.com\/tool-1473.html\">\u5236\u4f5c\u5c01\u9762\u7684\u8f6f\u4ef6<\/a>a\u7a0b\u5e8f\u4e0e\u4e00\u4e2a\u5185\u7f6eJVM\u7684\u539f\u751f\u7a0b\u5e8f\u7ed3\u5408\u5728\u4e00\u8d77\u3002\u8fd9\u6837\uff0c\u5f53\u4f60\u8fd0\u884c\u8fd9\u4e2aexe\u6587\u4ef6\u65f6\uff0c\u5b83\u4f1a\u542f\u52a8\u5185\u7f6e\u7684JVM\uff0c\u7136\u540e\u6267\u884c\u4f60\u7684Java\u7a0b\u5e8f\u3002<\/p>\n<p>### \u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p>\u4e3a\u4e86\u5c06Java\u7a0b\u5e8f\u751f\u6210\u4e3aexe\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u6216\u8005\u5e93\u3002\u8fd9\u91cc\u5217\u4e3e\u4e24\u4e2a\u5e38\u7528\u65b9\u6cd5\uff1a<\/p>\n<p>1. \u4f7f\u7528Launch4j<\/p>\n<p>Launch4j\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684Java\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u5de5\u5177\u3002\u5b83\u53ef\u4ee5\u5c06.jar\u6587\u4ef6\u58f3\u5316\u6210Windows\u5e73\u53f0\u7684exe\u6587\u4ef6\uff0c\u4ece\u800c\u5b9e\u73b0\u5728\u6ca1\u6709JRE\u73af\u5883\u4e0b\u4e5f\u80fd\u8fd0\u884cJava\u7a0b\u5e8f\u3002<\/p>\n<p>\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/p>\n<p>&#8211; \u9996\u5148\uff0c\u5c06Java\u7a0b\u5e8f\u7f16\u8bd1\u6210\u4e00\u4e2ajar\u6587\u4ef6\u3002\u5728Eclipse\u3001IntelliJ\u7b49IDE\u4e2d\uff0c\u76f4\u63a5\u5bfc\u51fajar\u6587\u4ef6\u5373\u53ef\u3002<\/p>\n<p>&#8211; \u4e0b\u8f7d\u5e76\u5b89\u88c5Launch4j\uff0c\u6253\u5f00Launch4j\uff0c\u914d\u7f6e\u57fa\u672c\u9009\u9879\uff1a<\/p>\n<p>  1. \u8f93\u5165JAR\u6587\u4ef6\u7684\u8def\u5f84\uff08\u590d\u5236jar\u6587\u4ef6\u8def\u5f84\u5e76\u7c98\u8d34\uff09\u3002<\/p>\n<p>  2. \u8f93\u5165\u751f\u6210\u7684exe\u6587\u4ef6\u7684\u8def\u5f84\uff08\u9009\u62e9\u751f<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/20\/15\/22610198228.jpg\" \/><\/figure>\n<\/p>\n<p>\u6210\u4f4d\u7f6e\u5e76\u547d\u540dexe\u6587\u4ef6\uff09\u3002<\/p>\n<p>  3. \u8bbe\u7f6e\u56fe\u6807\uff08\u53ef\u9009\uff09\u3002<\/p>\n<p>  4. \u5207\u6362\u5230JRE\u9009\u9879\u5361\uff0c\u8bbe\u7f6e\u6700\u4f4e\u548c\u6700\u9ad8\u517c\u5bb9\u7684Java\u7248\u672c\u3002<\/p>\n<p>  5. \u5355\u51fb&#8221;\u5e94\u7528&#8221;\u6309\u94ae\uff0c\u7136\u540e\u5355\u51fb&#8221;\u521b\u5efa&#8221;\u6309\u94ae\u3002<\/p>\n<p>\u4e4b\u540e\uff0c\u5728\u4f60\u6307\u5b9a\u7684exe\u6587\u4ef6\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u627e\u5230\u751f\u6210\u7684exe\u6587\u4ef6\u3002<\/p>\n<p>2. \u4f7f\u7528JSmooth<\/p>\n<p>JSmooth\u662f\u53e6\u4e00\u4e2a\u5c06Java\u7a0b\u5e8f\u8f6c\u6362\u4e3aexe\u6587\u4ef6\u7684\u5de5\u5177\u3002<\/p>\n<p>\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/p>\n<p>&#8211; \u548cLaunch4j\u4e00\u6837\uff0c\u4f60\u9700\u8981\u9996\u5148\u5c06Java\u7a0b\u5e8f\u7f16\u8bd1\u6210jar\u6587\u4ef6\u3002<\/p>\n<p>&#8211; \u4e0b\u8f7d\u5e76\u5b89\u88c5JSmooth\uff0c\u6253\u5f00JSmooth\uff0c\u914d\u7f6e\u57fa\u672c\u9009\u9879\uff1a<\/p>\n<p>  1. \u9009\u62e9\u9879\u76ee\u7c7b\u578b\uff0c\u63a8\u8350\u4f7f\u7528\u201cWindowed wrapper\u201d\u3002<\/p>\n<p>  2. \u8bbe\u7f6e\u8f93\u5165\u7684jar\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n<p>  3. \u8bbe\u7f6e\u751f\u6210\u7684exe\u6587\u4ef6\u7684\u8def\u5f84\u3002<\/p>\n<p>  4. \u8bbe\u7f6e\u56fe\u6807\uff08\u53ef\u9009\uff09\u3002<\/p>\n<p>  5. \u5207\u6362\u5230\u201cEmbeded JVM\u201d\u9009\u9879\u5361\uff0c\u8bbe\u7f6e\u6700\u4f4e\u517c\u5bb9\u7684Java\u7248\u672c\u3002<\/p>\n<p>  6. \u5355\u51fb&#8221;\u751f\u6210&#8221;\u6309\u94ae\u3002<\/p>\n<p>\u7136\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u6307\u5b9a\u4f4d\u7f6e\u627e\u5230\u751f\u6210\u7684exe\u6587\u4ef6\u3002<\/p>\n<p>\u603b\u4e4b\uff0cJava\u662f\u53ef\u4ee5\u751f\u6210exe\u6587\u4ef6\u3002\u867d\u7136\u8981\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u6765\u4e3a\u4f60\u63d0\u4f9bjar\u5230exe\u7684\u8f6c\u6362\uff0c\u4f46\u8fd9\u4e9b\u5de5\u5177\u5f88\u5bb9\u6613\u4e0a\u624b\uff0c\u5e76\u4e14\u5141\u8bb8\u4f60\u5229\u7528Java\u8bed\u8a00\u7684\u4fbf\u6377\u6027\u540c\u65f6\u4e3aWindows\u521b\u5efa\u6613\u4e8e\u5206\u53d1\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u7136\u53ef\u4ee5\uff01Java\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7\u4e00\u5b9a\u7684\u65b9\u6cd5\u751f\u6210\u53ef\u6267\u884c\u7684exe\u6587\u4ef6\u3002\u4e0b\u9762\u662f\u4f7f\u7528\u5f00\u6e90\u5de5\u5177\u8fdb\u884c\u751f\u6210exe\u6587\u4ef6\u7684\u539f\u7406\u548c\u8be6\u7ec6\u4ecb\u7ecd\u3002### \u539f\u7406Java\u662f\u89e3\u91ca\u6027\u8bed\u8a00\uff0c\u5b83\u7684\u7a0b\u5e8f\u9700\u8981\u8fd0\u884c\u5728Java\u865a\u62df\u673a\uff08JVM\uff09\u4e0a\u3002<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[35464,35463,132,797,2184],"topic":[],"class_list":["post-40222","post","type-post","status-publish","format-standard","hentry","category-kaifaexe","tag-exe","tag-exejre","tag-132","tag-797","tag-2184"],"_links":{"self":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/40222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/comments?post=40222"}],"version-history":[{"count":1,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/40222\/revisions"}],"predecessor-version":[{"id":40225,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/40222\/revisions\/40225"}],"wp:attachment":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/media?parent=40222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/categories?post=40222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/tags?post=40222"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/topic?post=40222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}