Step 7 - Watermarking of Several Jars without Obfuscation

Files located in the tutorial/step7/files directory:
mousegestures-1.2.jarMouse Gestures library jar
test.jarJar with mouse gestures demo frame
AddWatermark.batRuns Allatori's watermark embedding class
AddWatermark.xmlConfiguration file for adding a watermark
ExtractWatermark.batRuns Allatori's watermark extracting class
ExtractWatermark.xmlConfiguration file for extracting a watermark
Clean.batDeletes generated files


It is similar to Step 6 with one difference - we will use two jars for embedding the watermark. Let's look what have changed in the AddWatermark.xml file, changes are in bold:

<config>
    <jars>
        <jar in="test.jar" out="marked-test.jar"/>
        <jar in="mousegestures-1.2.jar" out="marked-mousegestures-1.2.jar"/>
    </jars>

    <watermark key="secure-key-to-extract-watermark" value="Customer: John Smith; Date: xx.yy.zzzz"/>
</config>

And here is the ExtractWatermark.xml file:

<config>
    <jars>
        <jar in="marked-test.jar"/>
        <jar in="marked-mousegestures-1.2.jar"/>
    </jars>

    <watermark key="secure-key-to-extract-watermark"/>
</config>

So the classes of both jars are used for embedding the watermark and it cannot be extracted from only one jar - you need both of them.

Step 6       Step 8       Contents