[英]create a run-only-once java application
I have to create a jar
with a java application that fulfills the following features: 我必须使用具有以下功能的Java应用程序创建一个jar
:
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. 当然,如果有人保留了原始文件的副本,他可以随时替换并重新开始。
Any user able to delete the binary file, will, with enough time, also be able to revert any changes made in the jar. 任何能够删除二进制文件的用户,只要有足够的时间,也将能够还原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. 您可以轻松地存储原始jar的备份,进行复制,将其用于一次运行,删除,复制原始jar等。您需要在用户计算机外部建立某种机制,例如激活服务器。 The user gets one code to activate an account, and can't use that code again. 用户获得一个激活帐户的代码,无法再使用该代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.