\u5c01\u88c5\u6253\u5305exe<\/a>\u7c98\u8d34\u4ee5\u4e0b\u914d\u7f6e\u6a21\u677f\uff0c\u6839\u636e\u9879\u76ee\u9700\u6c42\u8fdb\u884c\u4fee\u6539\uff1a<\/p>\n“`<\/p>\n
\n
\u00a0\u00a0output\\MyApp.exe<\/p>\n
\u00a0\u00a0input\\MyApp.jar<\/p>\n
\u00a0\u00a0http:\/\/java.com\/download<\/p>\n
\u00a0\u00a01.8.0<\/p>\n
\u00a0\u00a0com.example.Main<\/p>\n<\/p>\n
“`<\/p>\n
\u5c06 outfile \u4fee\u6539\u4e3a\u60a8\u5e0c\u671b\u5efa\u7acb\u7684 EXE \u6587\u4ef6\u7684\u8def\u5f84\u53ca\u540d\u79f0\uff1b <\/p>\n
\u5c06 jar \u4fee\u6539\u4e3a\u5df2\u751f\u6210\u7684 JAR \u6587\u4ef6\u7684\u8def\u5f84\u53ca\u540d\u79f0\uff1b<\/p>\n
\u5c06 mainClassName \u4fee\u6539\u4e3a Java \u5e94\u7528\u7684\u4e3b\u7c7b\u540d\u3002<\/p>\n
5. \u6784\u5efa .exe \u6587\u4ef6<\/p>\n
\u6253\u5f00 Terminal \u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u4f7f\u7528 Launch4j \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u6839\u636e\u914d\u7f6e\u6587\u4ef6\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff1a<\/p>\n
“`powershell<\/p>\n
path\\to\\launch4j\\laun<\/p>\n
<\/figure>\n<\/p>\nch4jc.exe path\\to\\launch4j\\launch4j.xml<\/p>\n
“`<\/p>\n
\u6ce8\u610f\u5c06 “path\\to\\launch4j” \u66ff\u6362\u4e3a\u60a8\u5b9e\u9645\u5b89\u88c5 Launch4j \u7684\u8def\u5f84\uff0c\u4ee5\u53ca “path\\to\\launch4j\\launch4j.xml” \u66ff\u6362\u4e3a\u60a8\u5b9e\u9645\u521b\u5efa\u7684 Launch4j \u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\u3002<\/p>\n
\u751f\u6210\u8fc7\u7a0b\u5b8c\u6210\u540e\uff0c\u5373\u53ef\u5728 outfile \u6307\u5b9a\u7684\u4f4d\u7f6e\u627e\u5230\u53ef\u6267\u884c\u7684 .exe \u6587\u4ef6\u3002\u73b0\u5728\uff0c\u60a8\u7684 Java \u5e94\u7528\u5df2\u7ecf\u6210\u529f\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u4ee5\u5728 Windows \u7cfb\u7edf\u4e0a\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
IntelliJ IDEA \u662f\u4e00\u6b3e\u975e\u5e38\u53d7\u6b22\u8fce\u7684 Java \u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u5c06 Java \u7a0b\u5e8f\u6253\u5305\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff08.exe \u6587\u4ef6\uff09\uff0c\u8fd9\u6837\u7528\u6237\u5c31\u53ef\u4ee5\u8f7b\u677e\u5730\u5728 Window<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[9627,24,12,9628,34],"topic":[],"class_list":["post-5130","post","type-post","status-publish","format-standard","hentry","category-zhuomianruanjian","tag-ue5windows","tag-24","tag-12","tag-exe","tag-34"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/5130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/comments?post=5130"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/5130\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/media?parent=5130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/categories?post=5130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/tags?post=5130"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/topic?post=5130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}