2

I am new to Proguard for obfuscation of Java jar files. However, I am facing issue getting it worked.

I tried many combinations to get it work

-dontobfuscate -dontoptimize -dontwarn -verbose

Also, I manually opened the jar file and compressed it back using jar command but I still get the same error.

Appreciate any help or pointers to fix the issue.

chandank
  • 953
  • 11
  • 24
  • The error look similar to http://stackoverflow.com/questions/27542110/spring-boot-obfuscator? Please offer more information and Proguard config. – Beck Yang Apr 15 '16 at 04:24
  • thanks, but even in that question the person who answered didn't give the solution rather than lecture/preach. I disabled all compression using the fields I showed but still it throws same error. I will add more information – chandank Apr 15 '16 at 13:51
  • @chandank Did you find a solution for this? Can you post it please – ALM Aug 17 '16 at 14:52
  • No I have not been able to find the solution. If you find then let me know. – chandank Oct 11 '16 at 17:18

1 Answers1

1

Since you don't have a clear question and your question title is pretty much the copy paste of the error I'm going to assume the following:

You are using Proguard to obfuscate a fat jar with nested jars inside.

Proguard compress the jar, that is why you are getting that error. Nested jar files must be stored without compression. Meaning the jars you have inside your fat jar need to be store without compression. Since Proguard compress the fat jar it compress the nested jars. There is no control over this for proguard, at least not that I know of.

A fix could be to unjar it, after Proguard is done, and then create the jar again without compression. To do this you can unjar it and then use:

jar c0mf

To create the jar again, the key is in the 0.

0 (zero)    Indicates that you don't want the JAR file to be compressed.

"Creating a JAR File"

adjective_name
  • 453
  • 2
  • 8
  • 19