Such a thing can not be achieved reliably if the code is in the hands of the foe. You can not make any code tamper-safe. All code you give away is untrusted.
Probably the best you can do is to obfuscate the code. They can still reverse engineer it, but it would be much harder. (Hopefully, to the point where it'd be much easier for them to code it from scratch than to re-use your code.)
Well, suggestions for how to "execute" protect an EAR file?
I was thinking that in order for the app to run one would have to upload an encrypted license file. It would contain some limits for how long to run and how many records to make and a check for processor id. If the validation failed, then no one could login.
You can not make any code tamper-safe. All code you give away is untrusted.
Hmmm, even not, if archives are signed ?
Actually my concern is not really reverse-engineering, but rather a way to assure users, that they have the "right/original" archive.