1# 2# This ProGuard configuration file illustrates how to process applets. 3# Usage: 4# java -jar proguard.jar @applets.pro 5# 6 7# Specify the input jars, output jars, and library jars. 8 9-injars in.jar 10-outjars out.jar 11 12-libraryjars <java.home>/lib/rt.jar 13 14# Preserve all public applets. 15 16-keep public class * extends java.applet.Applet 17 18# Print out a list of what we're preserving. 19 20-printseeds 21 22# Preserve all annotations. 23 24-keepattributes *Annotation* 25 26# Preserve all native method names and the names of their classes. 27 28-keepclasseswithmembernames class * { 29 native <methods>; 30} 31 32# Preserve the special static methods that are required in all enumeration 33# classes. 34 35-keepclassmembers class * extends java.lang.Enum { 36 public static **[] values(); 37 public static ** valueOf(java.lang.String); 38} 39 40# Explicitly preserve all serialization members. The Serializable interface 41# is only a marker interface, so it wouldn't save them. 42# You can comment this out if your library doesn't use serialization. 43# If your code contains serializable classes that have to be backward 44# compatible, please refer to the manual. 45 46-keepclassmembers class * implements java.io.Serializable { 47 static final long serialVersionUID; 48 static final java.io.ObjectStreamField[] serialPersistentFields; 49 private void writeObject(java.io.ObjectOutputStream); 50 private void readObject(java.io.ObjectInputStream); 51 java.lang.Object writeReplace(); 52 java.lang.Object readResolve(); 53} 54 55# Your application may contain more items that need to be preserved; 56# typically classes that are dynamically created using Class.forName: 57 58# -keep public class mypackage.MyClass 59# -keep public interface mypackage.MyInterface 60# -keep public class * implements mypackage.MyInterface 61