A P P E N D I X B

Support for ByteCode Obfuscators

The Wireless Toolkit contains a support framework for bytecode obfuscators. It also includes a plug-in for this framework for the ProGuard and Retroguard bytecode obfuscators. You can use a bytecode obfuscator other than ProGuard or RetroGuard, however, you must manually implement the plug-in for it. This appendix describes the implementation procedure.

Adding a ByteCode Obfuscator

To plug in a bytecode obfuscator of your choice into the Wireless Toolkit’s packaging process, you must follow these steps:

1.Write your own Java class that implements the

com.sun.kvem.environment.Obfuscator interface.

The class file for this interface is located in the {j2mewtk.dir}\wtklib\kenv.zip file. The implementation class needs to implement the following two interface methods:

createScriptFile(File jadFilename, File projectDir)

55

Page 69
Image 69
Sun Microsystems Computer Accessories manual Support for ByteCode Obfuscators, Adding a ByteCode Obfuscator