Reputation: 143
I have a jar file that has a package called "kaza". Inside this jar there is code that says:
JarFile jfile = new JarFile(fileName);
jfile.getJarEntry("kaza/");
When running from my jar, this line returns the jarEntry. When I obfuscate this jar using Proguard, this line is returning null although when I open the obfuscated jar, I find the "kaza" folder there!
I have tried changing it to:
jfile.getJarEntry("kaza\\");
or
jfile.getJarEntry("kaza");
But nothing worked!
What could be the problem? Thanks,
Upvotes: 0
Views: 189
Reputation: 45668
By default, ProGuard removes directory entries from jars. You should double-check that you have specified -keepdirectories
and that the directory entries are present in the processed jar. Make sure that it's not the zip archive viewer that is showing such entries, even when they aren't there. If this still doesn't work, you could try manually unzipping the jar and zipping it again, to see if it makes a difference.
Upvotes: 1