Reputation: 665
Here is example to show what i mean: http://www.minecraft.net/download.jsp
If you open the Minecraft.exe with winrar you can see the jar manifest and classes and you can actually launch the jar like this java -jar Minecraft.exe
But when i tried to embed my jar to my own exe as resource (i can see the classes same way as in minecraft.exe with winrar) and launch it with java -jar it fails with message
invalid or corrupt jar file
How can i embed the jar to exe correctly? so it can be launched same way as minecraft.exe?
Upvotes: 2
Views: 3022
Reputation: 308041
Launch4j is another tool that supports this (with quite a few extra features such as auto-downloading a JRE if necessary).
Upvotes: 0