Quick Start - RetroGuard Documentation


Prev   Contents   Next

Follow the steps below to get started right away with RetroGuard.

Step 1: Jar Your Code

Let's assume you have a Java application 'com.myco.MyApp' and a number of support classes in package 'com.myco':

javac com/myco/*.java
jar cf in.jar com/myco/*.class

So, you would usually run this application as:

java -classpath in.jar com.myco.MyApp

Step 2: Run RetroGuard

java -jar retroguard.jar

Step 3: Test Your Code

java -classpath out.jar com.myco.MyApp

Run your software as usual, but with the obfuscated out.jar in your classpath instead of the original in.jar. Test that everything works as it should. Any change in behavior shows that a custom RetroGuard script will be needed for your project, usually due to use of reflection in your software.

Step 4: Review 'retroguard.log'

Review the RetroGuard log file to ensure no warnings or errors occured during obfuscation.

Continue Reading...

RetroGuard's default settings will get you started, but creating a custom RetroGuard script file will mean fewer unobfuscated Java identifiers and smaller obfuscated code size. Continue reading to learn more about the default settings you just used, how to create your own script file, and how to integrate RetroGuard into your Apache Ant build process. You can output the RetroGuard internal default script using the utility RGdefault.

  • RetroGuard's internal default script will work for applications, applets, serializable classes, and RMI. However, the obfuscated jar size will probably be larger than if a custom script was used.
  • If you are obfuscating a Java library please read the rest of this document. A custom script file will certainly be needed to preserve all entry points into your library.
  • If your Java software uses reflection, then a custom RetroGuard script file may be required to prevent changes in behavior in your obfuscated Java software.


Prev   Contents   Next
 Copyright © 1998-2007 Retrologic Systems.
 All rights reserved.