简体   繁体   中英

Obfuscating one package in a java program

Is it possible to obfuscate only one package in a Java app? I am working on converting a large free app to a licensed one. As part of that I have added a new licensing module. I want to obfuscate this code to make it harder for people to crack it. It is a relatively small module and should not be too tough to obfuscate. The entire app is however large and complex and obfuscating it will result in a lot of testing effort.

您可以尝试Proguard(http://proguard.sourceforge.net/),只需将--injars选项设置为指向您要混淆的目录(软件包)

Yes it is possible to do that. Any half decent obfuscator will allow you to choose what parts of your application are obfuscated. Of course, details of how you do it will depend on the obfuscator that you are using.


Standard caveats about obfuscation apply: no obfuscation scheme will protect your IP against someone who has the motivation and a modicum of hacker skills.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM