Be aware that -pretty much whatever you do in a Java application- a determined attacker will be able to reverse-engineer it and remove any such check. So make sure that the kind of attacker you're trying to guard against is not determined and capable enough to work circumvent those checks.
Maybe he went home and went to bed. And took this tiny ad with him:
how do I do my own kindle-like thing - without amazon