Reputation: 420
I trying obfuscate two class in a jar file using proguard. one of my class has 12 method. i run proguard in command and gui form. but just two method of 12 method is obfuscated and 10 other method vanished. any one know why this happen?(its run without error) another problem is my public method in one of class converted to private therefore its not accessable in another project when i add my jar file to new project. thanks
this is my config file:
-injars PKTB.jar
-outjars PKTB_out.jar
-libraryjars "J:\Program Files (x86)\Java\jdk1.6.0\jre"
-libraryjars "C:\Users\Mohsen\Downloads\bcprov-jdk15on-147.jar"
-libraryjars "C:\Users\Mohsen\Downloads\bcpkix-jdk15on-147.jar"
-printmapping proguard.map
-keep public class pktb.PKTB{
public static void main(java.lang.String[]);
}
Upvotes: 1
Views: 296
Reputation: 1055
proguard removes unused classes, methods and variables. Review -dontshrink
here under "Shrinking Options"
You need preserve method/class names that are used outside of the jar, not only the main method. Review the -keep
option in the same link under "keep options"
Upvotes: 3