	Obfuscate documentation

A Java bytecode obfuscator
----------------------

This code will obfuscate the Java byte code for Applications and Applets.  
It will obfuscate the byte code contained in class files in the following 
manner:

	1. It will remove all debugging information contained in your class 
		files.
	2. It will rename all classes referenced by your main class file,
		except those with native methods. It will find these classes
		if they are on your CLASSPATH, even if they are in 
		non-compressed ZIP or JAR files.
        3. For renamed classes, it will remove their packages. This will 
		make your code harder to decipher since all classes will 
		be in the same directory.
	4. It will rename all class fields contained in your classes.
	5. It will rename all methods in your class files, except the main()
		method, methods that have the native modifier, and methods 
		that match the signatures:
			private void writeObject( 
				java.io.ObjectOutputStream )
			   private void readObject( 
				java.io.ObjectInputStream )

It will NOT obfuscate the Java library classes nor your methods that 
overload standard calls. Therefore, you dont have to distribute the 
Java classes with your program. 

For all classes, it will rename them to an alphabetic sequence.

For fields and methods, you have an option:
	If you select to do medium obfuscation, it will rename the item to 
		an alphabetic sequence.
	If you select to do high obfuscation, it will rename to item to an 
		alphanumeric sequence that is invalid to the Java language 
		syntax. Therefore, even if someone is able to de-compile your 
		code, they will not be able to re-compile it since it will no 
		longer conform to the Java language syntax.

Obfuscate is based on the hashjava API, which can be found (including source 
code) at http://www.sbktech.org/hashjava.html.

For your convenience, we have bundled that API into the Obfuscate code so you 
dont need to set it up. 

Requirements
-----------

To use this program, you must have a 1.0.2 or higher version JVM.

Using the program
---------------

To use the program, follow these steps:

	1. De-archive the Obfuscate.zip or Obfuscate.tar.gz file you 
	   downloaded. DO NOT de-archive the Obfuscate.cpz file that is 
	   created. This violates the license agreement.
	2. Move the Obfuscate.cpz file into its destination directory.
	3. Change to the directory containing your main class file
	4. Run the obfuscator using this command line (This should all be on
	   the same line):
		java -classpath <classes.zip>[:;]<Obfuscate.cpz> Obfuscate 
			[mh] [Main class] [Output dir]
	where:
		<classes.zip> is the full path to the java classes file
			distributed with your JVM
		[;;] is the path separator. This is ':' on UNIX and ';' on 
			MSDOS and OS/2 
		<Obfuscate.cpz> is the full path to the Obfuscate.cpz file
		[mh] Tells the program to do medium or high obfuscation 
			('m' for medium, 'h' for high)
		[Main class] is the name of the main class file of your Applet 
			or Application (dont put a package name before it)
		[Output dir] is the name of an output directory. If this 
			directory does not exist, it will be created.

	Example (this is what I use on my OS/2 machine):
		java -classpath \java\lib\classes.zip;\Obfuscate.cpz Obfuscate 
			h MyClass OutputDir
	NOTE: Java is case-sensitive. You MUST use the same capitalization as 
		given here.

Need to customize the Obfuscation?
----------------------------------

If you use RMI, localization, or if you need to be able to preserve certain 
class names and their methods and/or fields, check out ObfuscatePro at
http://www.JAMMConsulting.com under Products

Known Limitations/Problems
--------------------------

The swing classes will not work correctly when obfuscated.  If you want
to obfuscate an application that uses Swing, you must use ObfuscatePro
to exclude the Swing classes.  You can find information on ObfuscatePro
at http://www.JAMMConsulting.com under Products

If you get a message that reads "This isn't a class file", you may have run
into an incompatibility if you are using any archived class files (including 
the JDK classes.zip file). To fix this, de-archive the classes and run the
obfuscator with the classpath set to use the de-archived files. 
This has been report against JDK 1.1.6 on OS/2.

Some versions of Microsoft Internet Explorer and Netscape Navigator refuse to 
run Applets that are obfuscated with the "high" option. Things work fine
with the "medium" option.
Problems have been reported with:
	Internet Explorer 3.0.1
	Navigator 4.01
	Navigator 4.02 (including Communicator)

Obfuscate will not correctly handle classes that use Class.forName() since
the class that is referred to will be renamed.  In order to countermand this,
you must exclude the classes referred to by calls to Class.forName() using
the ObfuscatePro product.  You can find more info at
http://www.JAMMConsulting.com under Products.


Obfuscate will not correctly locate some classes in JAR files that contain 
files other than class files. In order to countermand this, extract the jar 
file and refer to the classes directly.

License Agreement for Obfuscate
-------------------------------

JAMM Consulting, Inc. is granting a license for anyone to use and distribute 
this program freely as long as the following conditions are satisfied:

	THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
	JAMM Consulting, Inc. disclaims all warranties expressed or 
		implied for this program. JAMM Consulting, Inc. 
		shall not be liable for any outcomes caused by the 
		use or misuse of this program.
	You may not de-archive the Obfuscate.cpz file.
	You may not disassemble, reverse-compile, reverse-assemble, 
		 or alter the files in any manner.
	All files are included in the distribution.
	Acknowledgement is made to JAMM Consulting, Inc.
	Each individual end-user (humans, not corporations) will register 
		this product after an evaluation period	of ten (10) days.
	At the end of the registration period, you will either delete
		the program or renew the registration.

Use of the program indicates your acceptance of the above license 
agreement.

If you would like a different licensing arrangement, contact
JAMM Consulting, Inc.

If you use this product for more than ten (10) days, you are 
obligated to register it. Registration costs US$15.00 per year. At the end
of the registration period, you must re-register or delete the product. To
register for Obfuscate, send your name, mailing address, and email address
(if you have one) to: 

	JAMM Consulting, Inc.
	7575 Frankford Rd. #724
	Dallas, TX 75252
	USA
	
	Attn: Obfuscate registration

Trademark Acknowledgements:
	Java is a trademark of Sun Microsystems, Inc.	
	Navigator is a trademark of Netscape Communications, Inc.
	Internet Explorer is a trademark of Microsoft Corporation, Inc.

For more information
-----------------

For more information and updates to the code, visit the Obfuscate home page at
http://www.JAMMConsulting.com under Products.



