I have a java SE application that will be distributed as a jar file. The application will take some of your identity information (like cell no., email) and give you credit points for actions you have performed. Each action can be performed only once. See the below code.
protected void setActionPerformed(boolean status){
actionPerformed = status;
}
What if some java programmer decompiles the jar file, modify the source and replace the class file after doing this.
protected void setActionPerformed(boolean status){
actionPerformed = Boolean.FALSE;
}
In this case, she can perform the same action multiple times.
This process of decompiling the jar file and replacing the class file after modification is possible because I have done it in the past (to resolve a bug in a jar library used by my webapp hence the question)
I believe there has to be some way to prevent this. How would my application know that the jar has been tampered with. What would be the ideal way of achieving this?
Please note that this question is not regarding "How to prevent decompilation of jar files?" It clearly says that decompiling is possible, but what after that?