How can you protect/encrypt your Java classes?

后端 未结 5 1629
北荒
北荒 2020-12-10 10:12

Some time ago, in my work I needed to protect some classes against other people to read the code. For that purpose, I created a EncryptedClassLoader, that loaded previously

5条回答
  •  暖寄归人
    2020-12-10 11:00

    The only way you can protect your code is simply to not allow the user to run it. Instead of distributing an application, sell access to an online service. Your code is then sat on a server and the only thing you're exposing is the interface.

    The alternative is to protect your code with contracts and lawyers, but unless you wrote something really good then this is going to cost you more than the revenue you'd otherwise have lost.

提交回复
热议问题