We develop a J2EE application, and we want to create a license, since the application will be hosted in the local server of the client, without Internet access.
Our need is to encrypt the application's source, and use the application in a period of one year, and just after, prohibit access to the application, the lock, if the customer does not renew its license. (Even if for a demo version)
Thank you for your suggestions, you are more experienced.
The other point is that I know that [B]. Classes [/ B] can decipher! but I have no idea if we can encrypt all sources (and even if there is that possibility, there is no way to decrypt it?
There is no 100% guaranteed way to do what you ask. You can obsfucate the code and add a time based license, but its not going to take too much effort for someone to work round this if they want to.
You can't encrypt it. You can obfuscate it, that basically means "make it less readable". But even then it's still readable (the JVM needs to be able to read it).
About the time based licence: you could write something like: if(currentDate > dayThatLicenceEnds) System.exit(1); but that will be "easy" to abuse (change system-time, change the value in the .class file).
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Yes, you are right ! everyone can change the code .class and activate the application
so, we can buy somme solution ? i don't konw it, but i supposed some thing like "use usb key for exemple" or some connecter can communicate with our application, but no bady can change the parameter or make copy this connecter or usb key