JAVA JAR 打包 EXE

JPACKAGE 简单 打包JAR 可能需要配置依赖包,未知

EXE4J 未试

launch4j 执行报错

launch4j maven 只生成exe

XML 复制代码
  <plugin>
                        <groupId>com.akathist.maven.plugins.launch4j</groupId>
                        <artifactId>launch4j-maven-plugin</artifactId>
                        <version>2.5.0</version>
                        <executions>
                            <execution>
                                <id>l4j-clui</id>
                                <phase>package</phase>
                                <goals><goal>launch4j</goal></goals>
                                <configuration>
                                    <!--运行方式,控制台-->
                                    <headerType>gui</headerType>

                                    <!--输出的exe文件-->
<!--                                    <outfile>${project.build.directory}/WeiKeDownload.exe</outfile>-->

                                    <!--输出的jar-->
<!--                                    <jar>${project.build.directory}/${artifactId}-${version}.jar</jar>-->
<!--                                    <jar>${project.build.directory}/${artifactId}-${version}-jar-with-dependencies.jar</jar>-->

                                    <!--错误标题-->
                                    <errTitle>error</errTitle>
                                    <classPath>
                                        <!--换成自己的主类-->
                                        <mainClass>com.example.demo.Main</mainClass>
                                        <addDependencies>true</addDependencies>
                                        <preCp>anything</preCp>
                                    </classPath>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
相关推荐
孫治AllenSun1 小时前
【算法】图相关算法和递归
windows·python·算法
QX_hao2 小时前
【Go】--反射(reflect)的使用
开发语言·后端·golang
inferno2 小时前
Maven基础(二)
java·开发语言·maven
我是李武涯3 小时前
从`std::mutex`到`std::lock_guard`与`std::unique_lock`的演进之路
开发语言·c++
史不了4 小时前
静态交叉编译rust程序
开发语言·后端·rust
读研的武4 小时前
DashGo零基础入门 纯Python的管理系统搭建
开发语言·python
Andy4 小时前
Python基础语法4
开发语言·python
但要及时清醒4 小时前
ArrayList和LinkedList
java·开发语言
孚亭5 小时前
Swift添加字体到项目中
开发语言·ios·swift