Two libraries -one open source, one commercial- for implementing license schemes in
Java are listed in
http://faq.javaranch.com/java/JavaIntermediateFaq#licensing
If the files are part of the application, then ultimately there is no way to protect them. You can make it harder using encryption and code obfuscation, but a determined attacker will be able to prevail. If the target audience is not very experienced very few may be able to do that, though; depends on who uses the application.