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>
相关推荐
郑州光合科技余经理36 分钟前
PHP构建:支撑欧美澳市场的同城生活服务平台开发
java·开发语言·数据库·uni-app·php·排序算法·生活
Robot侠8 小时前
极简LLM入门指南4
大数据·python·llm·prompt·提示工程
小浣熊熊熊熊熊熊熊丶8 小时前
《Effective Java》第25条:限制源文件为单个顶级类
java·开发语言·effective java
啃火龙果的兔子8 小时前
JDK 安装配置
java·开发语言
星哥说事8 小时前
应用程序监控:Java 与 Web 应用的实践
java·开发语言
等....9 小时前
Miniconda使用
开发语言·python
zfj3219 小时前
go为什么设计成源码依赖,而不是二进制依赖
开发语言·后端·golang
醇氧9 小时前
org.jetbrains.annotations的@Nullable 学习
java·开发语言·学习·intellij-idea
Java&Develop9 小时前
Aes加密 GCM java
java·开发语言·python
weixin_462446239 小时前
使用 Go 实现 SSE 流式推送 + 打字机效果(模拟 Coze Chat)
开发语言·后端·golang