Use obfuscators to protect your java programs

Source: Internet
Author: User

 


How to use technical GUARD:

Javasguard is a good Java obfuscator and is also included in the Enterprise Edition of JBuilder7.
Javasguard is a Java program (a Jar package). To use it, you must first install JDK. You need to set some environment variables before running. In addition to including the java execution PATH in the PATH, you also need to add D: etroguardRetroGuard to the classpath. jar (assume that your logging guard. jar in D: etroguard ). It doesn't matter if CLASSPATH is not set, but the path parameter must be added through-classpath each time it is run. Prepare the. jar file package you want to confuse after setting the good luck environment. As for how to package the compiled class into A. jar file, I will not talk about it here.
The execution format of technical guard is:
Java logging Guard [input the JAR file [output the JAR file ["retain the script file" [log file]

The "Reserved script file" describes the classes, functions, and variable names that must be retained and cannot be confused. The log file is a record file generated after execution, errors and obfuscation information recorded.
For "retain script files", you can set it through a graphical interface RGgui. The execution command is:
Java RGgui
After running the script, you can enter the Jar file as prompted and select the classes, functions, and variables to be retained. After the script is completed, the "Reserved script file" is automatically generated ". In fact, generally, you only need to keep the name of the starting class to run.
If your Jar package uses a third-party function library, such as the Siemens API, you must specify it in the-classpath parameter. For example:
Java-classpath c: siemenssmtk6688i?b8libapi.jar mongoguard in. jar out. jar script.txt log.txt

If the logging guard obfuscation fails, you can view the log file for error information.
Here I found a problem, that is, something similar... $1. when a file such as class is displayed, guard prompts an error. Later, I modified its source code and skipped the processing of the file.

In JBuilder7, the setting and usage of secure guard are as follows:
The Enterprise Edition of JBuilder7 contains javasguard v1.1, which is then included in the retroguard-v1.1 directory under the JBuilder7 installation path. In JBuilder7, mongoguard can be called directly. The method is as follows:
Click Tools-> Configure Obfuscators to Configure the Obfuscators. Click New... in the lower left corner to create a New obfuscator and select the paths of consumer guard to complete the configuration. To use Archive Builder, click "Wizards-> Archive Builder ..., select Archive type MIDlet (this is only applicable to the J2EE application), and set it step by step as prompted. When Step 1 is set as the obfuscator, select obfuscate the contents of the archive, select the Obfuscator FOR the Obfuscator, Use the classes specified blow to add the class to be retained (the start execution class is retained by default), and end the setting.
In this way, every compilation will automatically generate the obfuscated Jar package.


Sun's jade

Run java setup. class Installation

Under F: jadelib

Run java Jade + g

The graphical interface can be confused.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.