1 <!doctype html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2 <html> 3 <head> 4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> 5 <meta http-equiv="content-style-type" content="text/css"> 6 <link rel="stylesheet" type="text/css" href="style.css"> 7 <title>ProGuard Limitations</title> 8 </head> 9 <body> 10 11 <h2>Limitations</h2> 12 13 When using ProGuard, you should be aware of a few technical issues, all of 14 which are easily avoided or resolved: 15 <p> 16 <ul> 17 18 <li>For efficiency, ProGuard always ignores any <b>private or package visible 19 library classes</b> while reading library jars. If any of them are 20 extended by public library classes, and then extended again by input 21 classes, ProGuard will complain it can't find them. In that case, you'll 22 have to use the <code>-dontskipnonpubliclibraryclasses</code> option, and 23 maybe even the <code>-dontskipnonpubliclibraryclassmembers</code> option. 24 The graphical user interface has checkboxes for these settings. 25 <p> 26 27 <li>For best results, ProGuard's optimization algorithms assume that the 28 processed code never <b>intentionally throws NullPointerExceptions</b> or 29 ArrayIndexOutOfBoundsExceptions, or even OutOfMemoryErrors or 30 StackOverflowErrors, in order to achieve something useful. For instance, 31 it may remove a method call <code>myObject.myMethod()</code> if that call 32 wouldn't have any effect. It ignores the possibility that 33 <code>myObject</code> might be null, causing a NullPointerException. In 34 some way this is a good thing: optimized code may throw fewer exceptions. 35 Should this entire assumption be false, you'll have to switch off 36 optimization using the <code>-dontoptimize</code> option. 37 <p> 38 39 <li>If an input jar and a library jar contain classes in the <b>same 40 package</b>, the obfuscated output jar may contain class names that 41 overlap with class names in the library jar. This is most likely if the 42 library jar has been obfuscated before, as it will then probably contain 43 classes named 'a', 'b', etc. Packages should therefore never be split 44 across input jars and library jars. 45 <p> 46 47 <li>When obfuscating, ProGuard will write out class files named 48 "<code>a.class</code>", "<code>b.class</code>", etc. If there is a large 49 numbers of classes in the same package, it may also write out 50 <b>"<code>aux.class</code>"</b>. Windows doesn't allow creating files with 51 this reserved name (among a few other names), so it's generally better to 52 write the output to a jar, in order to avoid such problems. 53 <p> 54 55 </ul> 56 <p> 57 58 <hr> 59 <address> 60 Copyright © 2002-2009 61 <a href="http://www.graphics.cornell.edu/~eric/">Eric Lafortune</a>. 62 </address> 63 </body> 64 </html> 65