2012-01-04 8 views
0

안녕하세요 저는 proguard를 사용하여 자바 클래스를 난처하게했습니다. 난독 처리를 완료 한 후 Java 클래스를 디 컴파일하는 데 Java 디 컴파일러를 사용했는데 클래스 이름, 메소드 및 변수의 이름이 변경되지 않았고 아무 것도 열지 않았습니다. 내가했던 곳 내가 code.i을을 writting 동안 주어진 어떤 이름의 변화는 모르는이 설정은 이미 (문서화) 원래 이름을 가진 모든 클래스를 유지proguard를 사용하여 난독 화

injars 'E:\vsd_02\workplace\pro\dist\pro.jar' 
-outjars 'E:\vsd_02\workplace\pro\dist\pro_out.jar' 

-libraryjars 'C:\Program Files\Java\jre7\lib\rt.jar' 

-forceprocessing 
-printmapping 'E:\vsd_02\workplace\pro\dist\pro.map' 
-repackageclasses '' 
-renamesourcefileattribute SourceFile 
-verbose 
-dontwarn 


# Keep - Applications. Keep all application classes, along with their 'main' 
# methods. 
-keepclasseswithmembers public class * { 
    public static void main(java.lang.String[]); 
} 

# Also keep - Enumerations. Keep the special static methods that are required in 
# enumeration classes. 
-keepclassmembers enum * { 
    public static **[] values(); 
    public static ** valueOf(java.lang.String); 
} 

# Also keep - Serialization code. Keep all fields and methods that are used for 
# serialization. 
-keepclassmembers class * extends java.io.Serializable { 
    static final long serialVersionUID; 
    static final java.io.ObjectStreamField[] serialPersistentFields; 
    private void writeObject(java.io.ObjectOutputStream); 
    private void readObject(java.io.ObjectInputStream); 
    java.lang.Object writeReplace(); 
    java.lang.Object readResolve(); 
} 

# Also keep - Bean classes. Keep all specified classes, along with their getters 
# and setters. 
-keep class * { 
    void set*(***); 
    void set*(int,***); 
    boolean is*(); 
    boolean is*(int); 
    *** get*(); 
    *** get*(int); 
} 

# Also keep - Database drivers. Keep all implementations of java.sql.Driver. 
-keep class * extends java.sql.Driver 

# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI, 
# along with the special 'createUI' method. 
-keep class * extends javax.swing.plaf.ComponentUI { 
    public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent); 
} 

# Keep names - Native method names. Keep all native class/method names. 
-keepclasseswithmembers,allowshrinking class * { 
    native <methods>; 
} 

답변

0

이었다 잘못 congiguration 파일 :

# Also keep - Bean classes. Keep all specified classes, along with their getters 
# and setters. 
-keep class * { 
    ..... 
} 

또한 ProGuard ma nual> 문제 해결> 처리 후 예기치 않은 관찰>Variable names not being obfuscated.