You can look at the jCompiler library. Using it, you can compile and load java files dynamically. This means that you can store the java files in an encrypted format or download them as needed, making it much harder for the user to decompile them (I think they would have to do a heap dump and sift through the data in there to extract the classes).