gagabu
gagabu

Reputation: 41

create a run-only-once java application

I have to create a jar with a java application that fulfills the following features:

Summarizing I want to prevent a once started application to be reset in order to limit illegitimate reuse of the application.

Now to my ideas on how to accomplish that:

Any suggestions/ideas on how to accomplish that?

update:

I did not find a solution for this exact problem, but I found a simple workaround: along with my software I ship a certain file which gets changed after the program is started the first time. of course if someone keeps a copy of the original file he can always replace it and start over.

Upvotes: 1

Views: 1035

Answers (1)

Femaref
Femaref

Reputation: 61437

Any user able to delete the binary file, will, with enough time, also be able to revert any changes made in the jar. When the only existing part of the application is in the hand of the user, you won't able to prevent changes to it.

You can easily just store a backup of the original jar, make a copy, use that for one run, delete, copy the original jar, etc. You would need some sort of mechanism outside the users machine, like an activation server. The user gets one code to activate an account, and can't use that code again.

Upvotes: 1

Related Questions