java - launch4j 捆绑 JRE 错误 ."This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted"

标签 java swing desktop-application launch4j

我第一次使用 launch4j 并收到以下错误。这是launch4j错误日志。

Compiling resources
Generated resource file...
LANGUAGE 0, 1
2 RCDATA BEGIN "1.5.0\0" END
18 RCDATA BEGIN "1\0" END
21 RCDATA BEGIN "http://java.com/download\0" END
20 RCDATA BEGIN "32\0" END
101 RCDATA BEGIN "An error occurred while starting the application.\0" END
102 RCDATA BEGIN "This application was configured to use a 
bundled Java Runtime Environment but the runtime is missing or corrupted.\0" END
103 RCDATA BEGIN "This application requires a Java Runtime Environment\0" END
104 RCDATA BEGIN "The registry refers to a nonexistent
Java Runtime Environment installation or the runtime is corrupted.\0" END
17 RCDATA BEGIN "true\0" END

这是生成的 xml 文件

<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>/DesktopApp/launch4j/applicationname.jar</jar>
<outfile>/DesktopApp/launch4j/applicationname.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir></chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<manifest></manifest>
<icon></icon>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<minVersion>1.5.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
</jre>
</launch4jConfig>

非常感谢您的帮助。如果 launch4j 有替代方案,请告诉我。

最佳答案

我试图使用 *.png 文件作为我的图标,但它需要 *.ico。一旦我删除<icon>...</icon>从我的配置文件中,这个错误消失了。

关于java - launch4j 捆绑 JRE 错误 ."This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20089597/

相关文章:

java - Java中基于左大括号的字符串分割

java - 如何使用 Java RX Observable 链接异步操作?

java - 桌面应用程序中的 JPA 实体管理,其中对象用于保持修改状态

java - 一起使用GroupLayout和FlowLayout : OutPut is not appearing in Center

netbeans - 使用嵌入式数据库打包和部署 java 桌面应用程序

C# - 查找 Winform 应用程序的坐标

java - Java 视频如何在友好的安装过程中工作?

java - 从 Java Integer 到 Scala Int : toInt vs unbox? 的正确方法

java - 如何在机器人框架中使用 "Choose File"关键字上传文件

java - 如何重新绘制JTable的数据