How to protect compiled Java classes?

前端 未结 6 1117
-上瘾入骨i
-上瘾入骨i 2020-12-02 08:54

I know, many similar questions has been asked here. I am not asking if I can protect my compiled Java class - because obviously you will say \'no you can\'t\'. I am asking w

6条回答
  •  庸人自扰
    2020-12-02 08:56

    So how can you protect your classes from being decompiled? One answer is Crema. Crema scrambles the symbolic information in your .class files so that they will become less vulnerable to decompilation. The symbolic information that Crema scrambles includes the name of the class, its superclass, interfaces, variable names, methods, and so on. These symbolic names are needed by the Java virtual machine (JVM) to link your classes with library packages. Crema scrambles these symbolic names and makes references to them in the same way so that the JVM can still achieve the correct linking between classes and packages.

    So how does Crema work? Basically, before distributing your class files on the Internet, run Crema on them. Crema will scramble the symbolic information contained in them, and will place each new class in the file 1.crema. Your job then is to rename 1.crema to something like filename.class before distributing it on the Internet.

    HOW TO PROJECT JAVA COMPLIED CLASSSES

提交回复
热议问题