> I understand that it is relatively easy to decompile Java class files into
> source code.
>
> How can I protect my application from being decompiled?
You can't. What you can do, however, is use an obfuscator (e.g. ProGuard
- google for "java obfuscator" for more) which makes the resulting
decompiled code harder to understand/reuse/ripoff. Obfuscation usually
reduces the compiled bytecode size too.
All
Dave - 10 Jan 2007 10:03 GMT
>> I understand that it is relatively easy to decompile Java class files
>> into source code.
[quoted text clipped - 5 lines]
> decompiled code harder to understand/reuse/ripoff. Obfuscation usually
> reduces the compiled bytecode size too.
Sounds good, thanks.
Andreas Leitgeb - 10 Jan 2007 14:42 GMT
>> I understand that it is relatively easy to decompile Java class files into
>> source code.
>>
>> How can I protect my application from being decompiled?
>
> You can't. What you can do, however, is use an obfuscator ...
Or better yet, write code that you don't need to
feel ashamed of to show. ;-)
scnr.
Lew - 11 Jan 2007 07:50 GMT
Dave wrote:
>>> How can I protect my application from being decompiled?
> Or better yet, write code that you don't need to
> feel ashamed of to show. ;-)
Or write code that performs so awfully that no one would want to decompile it.
Seems stupid, but I've seen an awful lot of code in production that seems to
follow that philosophy.
- Lew
> I understand that it is relatively easy to decompile Java class files into
> source code.
>
> How can I protect my application from being decompiled?
Forgot to add - one 'defence' is to not give them your class files at
all, but present your code as a web application (e.g. using Tomcat +
servlets). May not be practical though.
Maybe you can encrypt your class file and implement your own classloader
> I understand that it is relatively easy to decompile Java class files into
> source code.
>
> How can I protect my application from being decompiled?
Laurent D.A.M. MENTEN - 10 Jan 2007 10:54 GMT
> Maybe you can encrypt your class file and implement your own classloader
>
>> I understand that it is relatively easy to decompile Java class files
>> into source code.
>>
>> How can I protect my application from being decompiled?
And as the custom classloader has to be be shipped with the encrypted
class...