aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes protecting .class file from decompilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "protecting .class file from decompilation" Watch "protecting .class file from decompilation" New topic
Author

protecting .class file from decompilation

hassan mahmood
Greenhorn

Joined: Jan 15, 2003
Posts: 17
can anyone tell me how to protect .class file from decompiling by any decompiler which r on the web.actually i have created a project and converted it into .jar format, but there is a chance to decompress it to get all the .class and then decompile it, so how can we protect .class files.
thanx in advance
Frederick Clark
Greenhorn

Joined: Mar 12, 2003
Posts: 8
Dear Friend, the only way I know to do that in java is trough "native method". You must implement the methods you create in java, those that you don't want to be uncompiled, in another compiled native language like c or c++, to make a DLL. Use the javah tool to make a header file to interface the java code and the DLL. But have a question. Why do you want protect your code from uncompiling? You should be benign with other programmers that doesn't know how to do make some things.
Well, good look in your project


Smart2006 recoded 2003
Gopi Balaji
Ranch Hand

Joined: Jan 23, 2003
Posts: 84
Hassan,
Search for "obfuscators" in the Net. These could help you.
They certainly do not prevent decompiling your class files, but, they obfuscate enough to make the decompiled code almost unreadable.
-GB.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: protecting .class file from decompilation
 
Similar Threads
protecting .class file from decompilation
Exam objective 2.1
protecting .class file from decompilation
How To Protect Your class file from Decompilation
Protection of .class file from decompilation.