• Home
  • Raw
  • Download

Lines Matching +full:- +full:jar

1 <!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
5 <meta http-equiv="content-style-type" content="text/css">
12 <!--
15 //-->
84 -injars myapplication.jar
85 -outjars myapplication_out.jar
86 -libraryjars &lt;java.home&gt;/lib/rt.jar
87 -printmapping myapplication.map
89 -keep public class mypackage.MyMain {
97 The <a href="usage.html#keep"><code>-keep</code></a> option specifies the
107 href="usage.html#printmapping"><code>-printmapping</code></a>, for
108 de-obfuscating any stack traces later on, or for incremental obfuscation of
113 -optimizationpasses 3
114 -overloadaggressively
115 -repackageclasses ''
116 -allowaccessmodification
119 output jar, by performing up to 3 optimization passes, and by aggressively
134 -injars in.jar
135 -outjars out.jar
136 -libraryjars &lt;java.home&gt;/lib/rt.jar
138 -keep public class mypackage.MyApplet
143 class in the library <code>rt.jar</code>.
157 -injars in.jar
158 -outjars out.jar
159 -libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
160 -libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
161 -overloadaggressively
162 -repackageclasses ''
163 -allowaccessmodification
164 -microedition
166 -keep public class mypackage.MyMIDlet
169 Note how we're now targeting the Java Micro Edition run-time environment of
170 <code>midpapi20.jar</code> and <code>cldcapi11.jar</code>, instead of the Java
171 Standard Edition run-time environment <code>rt.jar</code>. You can target
176 class in the library <code>midpapi20.jar</code>.
178 The <a href="usage.html#microedition"><code>-microedition</code></a> option
184 with a case-insensitive filing system, such as Windows. Because this tool
186 href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
192 Note that you will still have to adapt the midlet jar size in the
200 -injars in.jar
201 -outjars out.jar
202 -libraryjars /usr/local/java/javacard2.2.2/lib/api.jar
203 -dontwarn java.lang.Class
204 -overloadaggressively
205 -repackageclasses ''
206 -allowaccessmodification
208 -keep public class mypackage.MyApplet
212 it now targets the Java Card run-time environment. This environment doesn't
220 -injars in.jar
221 -outjars out.jar
222 -libraryjars /usr/local/java/jtv1.1/javatv.jar
223 -libraryjars /usr/local/java/cdc1.1/lib/cdc.jar
224 -libraryjars /usr/local/java/cdc1.1/lib/btclasses.zip
225 -overloadaggressively
226 -repackageclasses ''
227 -allowaccessmodification
229 -keep public class mypackage.MyXlet
233 it now targets the CDC run-time environment with the Java TV API.
240 -injars bin/classes
241 -outjars bin/classes-processed.jar
242 -libraryjars /usr/local/java/android-sdk/platforms/android-9/android.jar
244 -dontpreverify
245 -repackageclasses ''
246 -allowaccessmodification
247 -optimizations !code/simplification/arithmetic
249 -keep public class mypackage.MyActivity
252 We're targeting the Android run-time and keeping the activity as an entry
257 <a href="usage.html#dontpreverify"><code>-dontpreverify</code></a> option.
259 The <a href="usage.html#optimizations"><code>-optimizations</code></a> option
285 are listed on this line (<code>proguard-project.txt</code>,...) contain
289 <code>${sdk.dir}/tools/proguard/proguard-android-optimize.txt</code>
291 <code>${sdk.dir}/tools/proguard/proguard-android.txt</code>.</li>
309 -injars bin/classes
310 -injars libs
311 -outjars bin/classes-processed.jar
312 -libraryjars /usr/local/java/android-sdk/platforms/android-9/android.jar
314 -dontpreverify
315 -repackageclasses ''
316 -allowaccessmodification
317 -optimizations !code/simplification/arithmetic
318 -keepattributes *Annotation*
320 -keep public class * extends android.app.Activity
321 -keep public class * extends android.app.Application
322 -keep public class * extends android.app.Service
323 -keep public class * extends android.content.BroadcastReceiver
324 -keep public class * extends android.content.ContentProvider
326 -keep public class * extends android.view.View {
333 -keepclasseswithmembers class * {
337 -keepclasseswithmembers class * {
341 -keepclassmembers class * extends android.content.Context {
346 -keepclassmembers class * implements android.os.Parcelable {
350 -keepclassmembers class **.R$* {
354 -keepclassmembers class * {
377 We're keeping the static fields of referenced inner classes of auto-generated
391 -libraryjars /usr/local/android-sdk/add-ons/google_apis-7_r01/libs/maps.jar
398 -keep public interface com.android.vending.licensing.ILicensingService
405 -dontwarn android.support.**
424 -injars in.jar
425 -outjars out.jar
426 -libraryjars &lt;java.home&gt;/lib/rt.jar
427 -printmapping out.map
429 -keepparameternames
430 -renamesourcefileattribute SourceFile
431 -keepattributes Exceptions,InnerClasses,Signature,Deprecated,
434 -keep public class * {
438 -keepclassmembernames class * {
443 -keepclasseswithmembernames,includedescriptorclasses class * {
447 -keepclassmembers,allowoptimization enum * {
452 -keepclassmembers class * implements java.io.Serializable {
463 library. Only if there are any other non-public classes or methods that are
465 href="usage.html#keep"><code>-keep</code></a> options.
468 href="usage.html#keepclassmembernames"><code>-keepclassmembernames</code></a>
489 The <a href="usage.html#keepparameternames"><code>-keepparameternames</code></a>
506 <code>in.jar</code>:
508 -injars in.jar
509 -outjars out.jar
510 -libraryjars &lt;java.home&gt;/lib/rt.jar
511 -printseeds
513 -keepclasseswithmembers public class * {
519 href="usage.html#keepclasseswithmembers"><code>-keepclasseswithmembers</code></a>.
523 The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
537 <code>in.jar</code>:
539 -injars in.jar
540 -outjars out.jar
541 -libraryjars &lt;java.home&gt;/lib/rt.jar
542 -printseeds
544 -keep public class * extends java.applet.Applet
549 Again, the <a href="usage.html#printseeds"><code>-printseeds</code></a> option
562 <code>in.jar</code>:
564 -injars in.jar
565 -outjars out.jar
566 -libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
567 -libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
568 -overloadaggressively
569 -repackageclasses ''
570 -allowaccessmodification
571 -microedition
572 -printseeds
574 -keep public class * extends javax.microedition.midlet.MIDlet
579 The <a href="usage.html#microedition"><code>-microedition</code></a> option
585 with a case-insensitive filing system, such as Windows. Because this tool
587 href="usage.html#dontusemixedcaseclassnames"><code>-dontusemixedcaseclassnames</code></a>
590 The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
596 Note that you will still have to adapt the midlet jar size in the
602 <code>in.jar</code>:
604 -injars in.jar
605 -outjars out.jar
606 -libraryjars /usr/local/java/javacard2.2.2/lib/api.jar
607 -dontwarn java.lang.Class
608 -overloadaggressively
609 -repackageclasses ''
610 -allowaccessmodification
611 -printseeds
613 -keep public class * implements javacard.framework.Applet
619 The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
625 <code>in.jar</code>:
627 -injars in.jar
628 -outjars out.jar
629 -libraryjars /usr/local/java/jtv1.1/javatv.jar
630 -libraryjars /usr/local/java/cdc1.1/lib/cdc.jar
631 -libraryjars /usr/local/java/cdc1.1/lib/btclasses.zip
632 -overloadaggressively
633 -repackageclasses ''
634 -allowaccessmodification
635 -printseeds
637 -keep public class * implements javax.tv.xlet.Xlet
642 The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
648 <code>in.jar</code>:
650 -injars in.jar
651 -outjars out.jar
652 -libraryjars &lt;java.home&gt;/lib/rt.jar
653 -libraryjars /usr/local/java/servlet/servlet.jar
654 -printseeds
656 -keep public class * implements javax.servlet.Servlet
660 is not part of the standard run-time jar, so we're specifying it as a library.
668 The <a href="usage.html#printseeds"><code>-printseeds</code></a> option prints
681 <code>in.jar</code>:
683 -injars in.jar
684 -injars /usr/local/java/scala-2.9.1/lib/scala-library.jar
685 -outjars out.jar
686 -libraryjars &lt;java.home&gt;/lib/rt.jar
688 -dontwarn scala.**
690 -keepclasseswithmembers public class * {
694 -keep class * implements org.xml.sax.EntityResolver
696 -keepclassmembers class * {
700 -keepclassmembernames class scala.concurrent.forkjoin.ForkJoinPool {
708 -keepclassmembernames class scala.concurrent.forkjoin.ForkJoinWorkerThread {
714 -keepclassmembernames class scala.concurrent.forkjoin.ForkJoinTask {
718 -keepclassmembernames class scala.concurrent.forkjoin.LinkedTransferQueue {
728 runtime library as well. The processed jar can be an order of magnitude
732 The <a href="usage.html#dontwarn"><code>-dontwarn</code></a> option tells
737 The additional <a href="usage.html#keepoverview"><code>-keep</code></a>
754 -keepclasseswithmembernames,includedescriptorclasses class * {
760 <a href="usage.html#keepclasseswithmembernames"><code>-keepclasseswithmembernames</code></a>.
779 If they aren't preserved by other <code>-keep</code> options, something like
782 -keep class mypackage.MyCallbackClass {
795 static methods that the run-time environment accesses by introspection (Isn't
796 that just grand? Introspection is the self-modifying code of a new
800 -keepclassmembers,allowoptimization enum * {
814 long-term storage. Classes that are shrunk and obfuscated should then
818 -keepclassmembers class * implements java.io.Serializable {
829 href="usage.html#keepclassmembers"><code>-keepclassmembers</code></a>
831 option instead of the basic <code>-keep</code> option, we're not
843 -keepnames class * implements java.io.Serializable
845 -keepclassmembers class * implements java.io.Serializable {
859 The <code>&lt;fields&gt;</code> line preserves all non-static,
860 non-transient fields, with their original names. The introspection of the
861 serialization process and the de-serialization process will then find
877 -keepnames class * implements java.io.Serializable
879 -keepclassmembers class * implements java.io.Serializable {
895 interfaces of the serializable classes (using something like "<code>-keep
897 computing the UID. A fast but sub-optimal alternative would be simply
898 keeping all interfaces with "<code>-keep interface *</code>".</li>
901 higher, you need to preserve some methods and adapt the hard-coded names
905 -keepclassmembers class * {
909 -keepclassmembernames class * {
913 -adaptclassstrings com.example.Test
918 Java run-time.
937 -keep public class mypackage.MyBean {
942 -keep public class mypackage.MyBeanEditor
949 -keep class mybeans.** {
961 The '<code>***</code>' wildcard matches any type (primitive or non-primitive,
962 array or non-array). The methods with the '<code>int</code>' arguments matches
975 -keepattributes *Annotation*
984 code, you could refine this selection, for instance not keeping the run-time
985 invisible annotations (which are only used at compile-time).
991 -keepattributes EnclosingMethod
1000 -keep class * implements java.sql.Driver
1016 -keep class * extends javax.swing.plaf.ComponentUI {
1029 -keepattributes Exceptions
1031 -keep interface * extends java.rmi.Remote {
1035 -keep class * implements java.rmi.Remote {
1040 The first <code>-keep</code> option keeps all your Remote interfaces and their
1050 If your application is using JEE-style resource injection, the application
1057 -keepclassmembers class * {
1064 -keepclassmembers class * {
1076 -adaptresourcefilenames **.properties,**.gif,**.jpg
1077 -adaptresourcefilecontents **.properties,META-INF/MANIFEST.MF
1080 The <a href="usage.html#adaptresourcefilenames">-adaptresourcefilenames</a>
1084 href="usage.html#adaptresourcefilecontents">-adaptresourcefilecontents</a>
1095 signing information, you should sign the jar again after it has been
1098 If you're merging several input jars into a single output jar, you'll have to
1101 -injars in1.jar
1102 -injars in2.jar(!META-INF/MANIFEST.MF)
1103 -injars in3.jar(!META-INF/MANIFEST.MF)
1104 -outjars out.jar
1107 The filters will let ProGuard copy the manifest file from the first jar and
1117 -printmapping out.map
1119 -renamesourcefileattribute SourceFile
1120 -keepattributes SourceFile,LineNumberTable
1130 Whenever both of these attributes are present, the Java run-time environment
1170 href="usage.html#flattenpackagehierarchy"><code>-flattenpackagehierarchy</code></a>
1174 -flattenpackagehierarchy 'myobfuscated'
1189 href="usage.html#repackageclasses"><code>-repackageclasses</code></a> option
1193 -repackageclasses 'myobfuscated'
1207 href="usage.html#allowaccessmodification"><code>-allowaccessmodification</code></a>
1211 -repackageclasses 'myobfuscated'
1212 -allowaccessmodification
1227 -repackageclasses ''
1228 -allowaccessmodification
1248 logging methods don't have side-effects &mdash; even though they actually do,
1256 -assumenosideeffects class android.util.Log {
1277 a single jar. For example:
1279 -injars classes
1280 -injars in1.jar
1281 -injars in2.jar
1282 -injars in3.jar
1283 -outjars out.jar
1287 <code>classes</code> directory and the three jars into a single output jar
1288 <code>out.jar</code>.
1294 -injars in1.jar
1295 -injars in2.jar
1296 -injars in3.jar
1297 -outjars out
1305 -injars in1.jar
1306 -injars in2.jar
1307 -injars in3.jar
1308 -outjars out.war
1314 -injars in.war
1315 -outjars out.jar
1320 <code>out.jar</code>.
1324 <a href="usage.html#injars"><code>-injars</code></a> and <a
1325 href="usage.html#outjars"><code>-outjars</code></a> options. For example:
1327 -injars base_in1.jar
1328 -injars base_in2.jar
1329 -injars base_in3.jar
1330 -outjars base_out.jar
1332 -injars extra_in.jar
1333 -outjars extra_out.jar
1336 This configuration puts the processed results of all <code>base_in*.jar</code>
1337 jars into <code>base_out.jar</code>, and the processed results of the
1338 <code>extra_in.jar</code> into <code>extra_out.jar</code>. Note that only the
1350 you want to disregard certain files from an input jar:
1352 -injars in.jar(!images/**)
1353 -outjars out.jar
1360 the output. For example, only keeping the manifest file from a first input jar:
1362 -injars in1.jar
1363 -injars in2.jar(!META-INF/MANIFEST.MF)
1364 -injars in3.jar(!META-INF/MANIFEST.MF)
1365 -outjars out.jar
1369 disregarding a large number of irrelevant classes in the runtime library jar:
1371 -libraryjars &lt;java.home&gt;/lib/rt.jar(java/**,javax/**)
1380 -injars in(**/acme_*.jar;)
1381 -outjars out.jar
1384 Note the semi-colon in the filter; the filter in front of it applies to jar
1385 names. In this case, only <code>acme_*.jar</code> jars are read from the
1387 names, and zip names can be prefixed with additional semi-colons. All types of
1393 -injars in.jar
1394 -outjars code_out.jar(**.class)
1395 -outjars resources_out.jar
1399 files to <code>code_out.jar</code>, and all remaining files to
1400 <code>resources_out.jar</code>.
1413 input in this directory, using the original jar names. For example, showing
1416 -injars application1.jar
1417 -injars application2.jar
1418 -injars application3.jar
1419 -outjars processed_applications
1431 -injars proguardgui.jar
1432 -outjars proguardgui_out.jar
1433 -injars proguard.jar
1434 -outjars proguard_out.jar
1435 -libraryjars &lt;java.home&gt;/lib/rt.jar
1436 -applymapping proguard.map
1438 -keep public class proguard.gui.ProGuardGUI {
1445 href="usage.html#applymapping"><code>-applymapping</code></a> option then
1448 ProGuard jar and the additional obfuscated GUI jar.
1451 original code. The <code>proguard_out.jar</code> will be identical to the one
1454 href="usage.html#useuniqueclassmembernames"><code>-useuniqueclassmembernames</code></a>,
1455 <a href="usage.html#dontshrink"><code>-dontshrink</code></a>, and <a
1456 href="usage.html#dontoptimize"><code>-dontoptimize</code></a> <i>in the
1458 jar will always remain usable without changes. You can then specify the base
1459 jar as a library jar:
1461 -injars proguardgui.jar
1462 -outjars proguardgui_out.jar
1463 -libraryjars proguard.jar
1464 -libraryjars &lt;java.home&gt;/lib/rt.jar
1465 -applymapping proguard.map
1467 -keep public class proguard.gui.ProGuardGUI {
1480 -injars in.jar
1481 -outjars out.jar
1482 -libraryjars /usr/local/java/wtk2.5.2/lib/midpapi20.jar
1483 -libraryjars /usr/local/java/wtk2.5.2/lib/cldcapi11.jar
1485 -dontshrink
1486 -dontoptimize
1487 -dontobfuscate
1489 -microedition
1494 href="usage.html#microedition"><code>-microedition</code></a> option. Note
1495 that we don't need any <code>-keep</code> options to specify entry points; all
1504 -injars in.jar
1505 -outjars out.jar
1506 -libraryjars &lt;java.home&gt;/lib/rt.jar
1508 -dontshrink
1509 -dontoptimize
1510 -dontobfuscate
1512 -target 1.6
1516 href="usage.html#target"><code>-target</code></a> option. They will
1518 any <code>-keep</code> options to specify entry points; all class files are
1526 -injars in.jar
1527 -libraryjars &lt;java.home&gt;/lib/rt.jar
1529 -dontoptimize
1530 -dontobfuscate
1531 -dontpreverify
1532 -printusage
1534 -keep public class mypackage.MyApplication {
1539 We're not specifying an output jar, just printing out some results. We're
1546 href="usage.html#keepclassmembers"><code>-keepclassmembers</code></a> option
1549 -keepclassmembers class * {
1558 jar:
1560 -injars in.jar
1562 -dontshrink
1563 -dontoptimize
1564 -dontobfuscate
1565 -dontpreverify
1567 -dump
1570 Note how we don't need to specify the Java run-time jar, because we're not
1571 processing the input jar at all.
1582 The annotation classes are defined in <code>annotations.jar</code>. The
1583 corresponding ProGuard configuration (or meta-configuration, if you prefer)
1597 -injars in.jar
1598 -outjars out.jar
1599 -libraryjars &lt;java.home&gt;/lib/rt.jar
1601 -include lib/annotations.pro
1604 The annotations are effectively replacing the application-dependent
1605 <code>-keep</code> options. You may still wish to add traditional
1606 <code>-keep</code> options for processing <a href="#native">native
1616 Copyright &copy; 2002-2014