launch4j/OneJAR 打包的 .exe 文件已损坏
我正在使用 OneJAR 将我的应用程序打包到一个 jar 中。
OneJAR 创建的 .jar 文件在 Windows 上完美启动,并且 JOGL 代码运行良好。
然后我使用 launch4j 将这个 .jar 文件转换为 .exe 文件。
当我尝试执行该文件时,Windows (7) 报告该文件已损坏。
我的应用程序包含一些我怀疑可能相关的本机代码(JOGL DLL)。
如果我创建一个没有 OneJAR 的可执行 jar 并将其转换为可以启动的 .exe,尽管它会抱怨缺少 JOGL DLL(当然,因为它们不能包含在没有像 OneJAR 这样的东西的 jar 中)。
那么有没有人让 OneJAR+launch4j+DLL 的组合起作用,或者这是行不通的?
I'm using OneJAR to package my application into a single jar.
The OneJAR created .jar file launches perfectly on Windows and the JOGL code runs fine.
I then I turn this .jar file into an .exe file using launch4j.
When I try to execute that file, Windows (7) reports that the file is corrupt.
My application includes some native code (JOGL DLL's) which I suspect maybe related.
If I create an executable jar without OneJAR and turn this into .exe that lauches alright, though it the complains about the missing JOGL DLL's (naturally as they cannot be included in the jar without something like OneJAR).
So has anyone made that combination OneJAR+launch4j+DLLs work or is this something that is not going to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 JarSplice,它对我来说与 Launch4j 配合得很好。
try JarSplice, it worked fine for me with Launch4j.
问题解决,请参阅我对加文答案的评论,我的愚蠢错误。
Problem solve, see my comment on Gavin's Answer, silly mistake of mine.