• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

protecting .class file from decompilation

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic