title: How to protect Java codes against decompiler?
body: <p>As we know , there are a lot of java decompiler tools which can convert .class to .java file.</p>
  
  <p>Therefore,we need to protect our .java files against decompiler. I know this is a big topic,and maybe there is no ending.</p>
  
  <p>Usually, there are two ways : obfuscator and customized classloader.</p>
  
  <p>Is there any mature solution or open source framework,  which combined those two ways ?</p>
  
  <p>Another aspect is related with exe4j, which package jars to exe file,seems like it can protect java codes , because what we can see is exe file instead of jars or class files. But indeed, when it runs, it decompose all jars files into temporary directories, that means it is easy to get class files for decompiler. 
  So any considerations for protecting java codes from the aspect of exe4j ?</p>
  
  <p>Thanks for your comments and suggests.</p>
  
  <p>Updating</p>
  
  <p>Thanks everyone for your suggest or experience share. That is helpful to me.
  To make a conclusion, I will give up any obfuscator or customized classloader with encryption things. Because finally Java codes can be disclosed before clever hackers.</p>
  
  <p>I will remove some core codes during compiler time using tricks like "#ifdef" in C language. In Java, static and final boolean class variable can be used to do the same job. 
  Then the compilered class file will not contain need-protected java codes. </p>