我第一次使用 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
最佳答案
您的 Launch4J XML 文件有问题。我遇到了类似的问题,因为我使用了 BMP 并将扩展名更改为 ICO,但它不是实际的图标。当您运行构建时,将检查您声明的所有资源。
就您而言,它告诉您 C:\Users\HP\AppData\Local\Temp\launch4j5018895285025730359rc
不存在。检查您的 Launch4J 条目并确保您引用了有效的文件。然后再次尝试构建。
关于java - 我第一次使用 launch4j 并收到以下错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42810440/