How do I compress a jar file with a manifest file and keep it executable? For example I was trying to use the following to create an executable jar:

1

bjwflate -s513A.classMETA-INF\MANIFEST.MF

Whenever I try to run it it tells me the jar file is corrupt. This happens a lot after using certain optimizers as well. I also verified that I can create a jar file with the jar command and 7zip that runs ok.

How do I compress a jar file with a manifest file and keep it executable? For example I was trying to use the following to create an executable jar:

1

bjwflate -s513A.classMETA-INF\MANIFEST.MF

Whenever I try to run it it tells me the jar file is corrupt. This happens a lot after using certain optimizers as well. I also verified that I can create a jar file with the jar command and 7zip that runs ok.

Thanks,Casey

Basically, bjwflate flattens the contents of the file when you do it that way - in other words, the manifest is no longer under meta-inf, and thus the jar is invalid.

Doing it Hsaka's way should maintain the folder structure, and it should end up being valid.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org