Step 3 - Obfuscation with Setting Classpath

Files located in the tutorial/step3/files directory:
mousegestures-1.2.jarMouse Gestures library jar
test.jarJar with mouse gestures demo frame
RunAllatori.batRuns Allatori Obfuscator
MouseGesturesOriginal.batRuns original version of the Mouse Gestures
MouseGesturesObfuscated.batRuns obfuscated version of the Mouse Gestures
config.xmlAllatori configuration file
Clean.batDeletes generated files


Here we will obfuscate our jars as if test.jar is a stand-alone application and mousegestures-1.2.jar is a third party library used by test.jar.

Let's look what have changed in the configuration file, changes are in bold:

<config>
    <jars>
        <jar in="test.jar" out="obf-test.jar"/>
    </jars>

    <classpath>
        <jar name="mousegestures-1.2.jar"/>
    </classpath>

    <keep-names>
        <class template="class *.TestFrame"/>
    </keep-names>

    <property name="log-file" value="log.xml"/>
</config>

We have removed mousegestures-1.2.jar from jars section and added new section classpath with reference to Mouse Gestures library. Note that it is not necessary to reference all jars that are needed by your application in the classpath section, but you should understand that missing classpath elements can result in a weaker obfuscation. If you delete (or comment) classpath section Allatori will warn you about missing classes during the obfuscation process.

Step 2       Step 4       Contents