1、导出jar文件
(1)、在eclipse中选择要导出的项目,右击打开菜单,选择Export;
(2)、在弹出对话框中,选择Java/Runnable JAR file,单击Next;
(3)、在Runable JAR File Export对话框
在Export destination项选择目录,并输入目标文件名称,譬如C:\huguofeng\demp.jar;
在Launch configuration项选择入库类,譬如MainApp-demo;
在Library handling项根据需要选择,譬如选择Copy required libraries into a sub-folder next to the generated JAR,将库文件和jar文件分开。
2、将jar文件转化成exe文件(采用exe4j工具)
(1)、打开exe4j工具进入welcome页面,单击Next;
(2)、在Project type页面,选择Regular mode,单击Next;
(3)、在Configure application页面,选择Distribution source directory和Executable directory,并输入Short name of your application,单击Next;
(4)、在Configure executable页面,输入Executable name,对于32bit PC,单击Next;对于64Bit PC,选择Advanced Options/32bit or 64 bit,在Select the architecture of the generated executable中选择Generate 64-bit executable,单击Next;
(5)、在Configure Java invocation页面,添加Class path和Main class,单击Next;
(6)、在Configure JRE页面,输入Mininum version,譬如1.8,单击Next;
(7)、一直单击Next,生成exe文件;
(8)、在exe4j has finished页面,单击Click Here to Start the Application打开生成的exe文件,检查是否正常操作。
在Eclipse中将maven项目文件转化为exe文件
最新推荐文章于 2024-01-04 17:38:07 发布