简体   繁体   中英

launch4j/OneJAR packed .exe file corrupted

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?

尝试JarSplice ,它对Launch4j很好用。

Problem solve, see my comment on Gavin's Answer, silly mistake of mine.

Bah, silly mistake of mine, sorry about the noise. The problem was that my Ant-script had a jstub Ant-task that mangled the .jar file before launch4j had a chance to do its magic. So I can report that OneJAR and launch4j work perfectly together, highly recommended.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM