我是第一次使用launch4j,我得到以下错误

时间:2017-03-15 12:55:50

标签: java exception runtime.exec launch4j

我第一次使用launch4j并且出现以下错误

这是错误日志:

Compiling resources
C:\Program Files (x86)\Launch4j\bin\windres.exe: can't popen `type  C:\Users\HP\AppData\Local\Temp\launch4j5018895285025730359rc': No error
Generated resource file...

LANGUAGE 0, 1
2 RCDATA BEGIN "1.0.0\0" END
18 RCDATA BEGIN "1\0" END
30 RCDATA BEGIN "2\0" END
21 RCDATA BEGIN "http://java.com/download\0" END
8 RCDATA BEGIN ".\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

net.sf.launch4j.ExecException: Exec failed (1): C:\Program Files (x86)\Launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\HP\AppData\Local\Temp\launch4j5018895285025730359rc C:\Users\HP\AppData\Local\Temp\launch4j182279593561858687o

1 个答案:

答案 0 :(得分:0)

您的Launch4J XML文件存在问题。我遇到了类似的问题,因为我使用了BMP并将扩展名更改为ICO,但它不是真正的图标。运行构建时会检查所有声明的资源。

在您的情况下,它告诉您C:\Users\HP\AppData\Local\Temp\launch4j5018895285025730359rc不存在。检查Launch4J条目并确保引用有效文件。然后再次尝试构建。