Java obfuscation compiler (to apusic.com)

Source: Internet
Author: User
I recently tried several Java obfuscators (Java Obfuscator). I feel that none of them are completely satisfied, so I just want to write one by myself. After several pages of Java virtual machine specifications, I was amazed. Other obfuscators are all posting on the compiled byte code. Can I directly compile the code into a obfuscated class file from the source code? It took more than a week to write a Java obfuscation Compiler (Java Obfuscator Compiler ).
Q: What is a obfuscator?
A: The Java program is dynamically connected when running the program. Therefore, the compiled target file contains A signed table, which makes the Java program easily decompiled, obfuscators can disrupt the symbolic information in the class file, making reverse engineering very difficult.
Q: What are the problems with the existing obfuscators?
A: The existing obfuscators confuse the compiled class files. In this way, the compilation and obfuscation steps are required. Not all symbols need to be confused. If you develop a class library or some classes need to be dynamically loaded, those public APIs must keep the symbols unchanged, so that others can use your class library. The existing obfuscators provide a GUI or script to configure the symbol names to be retained. If the program is large, the configuration becomes complicated, once the program is modified, it must be re-executed. Some obfuscators can adjust the byte code sequence to make it more difficult to decompile, but I have experienced program running errors after obfuscation.
Q: How does Java obfuscation compiler work?
A: The Java obfuscation compiler is based on the Java compiler (javac) provided by Sun JDK. It modifies the code generation process and obfuscation the intermediate code generated by the compiler, finally, generate the class file. In this way, only one step is required for compilation and obfuscation. In addition, you can insert the symbol retention command in the source program to control which symbols need to be retained without separate configuration.
Q: How to install and run JOC?
A: Download joc. jar (http://www.apusic.com/product/cpsy.htm), run java-jar joc. jar can start the Java obfuscation compiler. The command line parameters of joc are identical to those of javac, but a new parameter-Xobfuscate is added. Its usage is as follows:
-Xobfuscate: <level>
The <level> specified obfuscation level can be:
-Xobfuscate: none
-Xobfuscate: obfuscation of all private access-level elements
-Xobfuscate: The package obfuscated all private or package private elements.
Related Article

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.