gpt4 book ai didi

java - Exec 失败错误 - launch4j Maven 插件

转载 作者:行者123 更新时间:2023-12-02 11:25:30 24 4
gpt4 key购买 nike

我正在尝试使用 Maven 构建一个 exe,并按照本指南使用 Maven 中的 launch4j 插件进行操作。

http://www.hascode.com/2012/08/creating-a-windows-executable-from-a-jar-using-maven/

执行全新安装后,我收到此错误

net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\Users\User.Name\.m2\repository\com\akathist\maven\plugins\launch4j\launch4j-maven-plugin\1.5.1\launch4j-maven-plugin-1.5.1-workdir-win32\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\User~1.NAME\AppData\Local\Temp\launch4j4886282584342156537rc C:\Users\User~1.NAME\AppData\Local\Temp\launch4j7500715410847281339o
at net.sf.launch4j.Builder.build(Builder.java:144)
at com.akathist.maven.plugins.launch4j.Launch4jMojo.execute(Launch4jMojo.java:353)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: net.sf.launch4j.ExecException: Exec failed (1): C:\Users\User.Name\.m2\repository\com\akathist\maven\plugins\launch4j\launch4j-maven-plugin\1.5.1\launch4j-maven-plugin-1.5.1-workdir-win32\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\User~1.NAME\AppData\Local\Temp\launch4j4886282584342156537rc C:\Users\User~1.NAME\AppData\Local\Temp\launch4j7500715410847281339o
at net.sf.launch4j.Util.exec(Util.java:148)
at net.sf.launch4j.Cmd.exec(Builder.java:205)
at net.sf.launch4j.Builder.build(Builder.java:97)

对此有什么解决办法吗?

最佳答案

问题出在 src/main/resources 中的图标。这是一个损坏的 .ico 文件

关于java - Exec 失败错误 - launch4j Maven 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49669617/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com