最佳实践:Java 桌面应用程序的许可证强制执行

发布于 2024-07-16 08:41:51 字数 1431 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

嘦怹 2024-07-23 08:41:51

看一下 truelicense,它是一个用于实现此目的的开源框架。 如果您想自己制作,有一些文档解释了这些概念,您也可以通过查看代码获得一些好主意。

编辑:
值得一提的是,这不是一个复制保护方案

Take a look at truelicense which is an open source framework for doing just that. If you want to make your own there is some documentation that explains the concepts and you can probably get some good ideas by looking at the code as well.

EDIT:
worth mentioning that it is not a copy-protection scheme

那请放手 2024-07-23 08:41:51

我建议您甚至不要尝试添加复制保护。 你只会惹恼别人。 如果人们喜欢你的产品,你就更有可能获得销售。 心胸狭隘、对待顾客像小偷一样是没有帮助的。 (除非该产品真的很糟糕,并且您必须阻止人们在购买之前尝试它。)

您可能想要发送一个许可证密钥,其唯一目的是满足那些想要用自己的钱获得某些东西的用户。 只需在某处添加一个状态即可显示是否已付款。 状态需要相当明显,以便清楚地表明发生了某些事情(我很久以前开发的一个产品有两张软盘 - 一半的支持电话是因为安装程序没有要求第二张 [win32s]光盘)。

I suggest you don't even attempt to add copy protection. You will just annoy people. You are much more likely to get sales if people like your product. Being petty and treating customers like thieves is not going to help. (Unless the product really sucks, and you have to prevent people from being able to try it before they buy.)

You might want to send a license key the sole purpose of which is to satisfy users that want to receive something for their money. Just add a status somewhere to show whether it has been paid for. The status needs to be reasonably obvious so that it is clear that something has happened (a product I worked on along time ago came on floppy two discs - half of the support calls were because the installer didn't ask for the second [win32s] disc).

梦幻的味道 2024-07-23 08:41:51

据我所知,没有一个许可方案是不容易被破坏的。 我不会详细介绍,但作为一个例子,在 Java 的情况下,如果它是用 Java 完成的,那么它可以被反编译(C++ 或任何编译语言也可以,但 Java 比 C++ 更容易)。 如果它是本机完成的,那么您需要本机方法,并且 DLL/so 可以替换为允许访问的方法。

对于 C/C++ 示例,我知道有人对 CL(微软编译器)进行了反编译,以弄清楚他们是如何进行名称修改的。 他们所拥有的只是二进制文件,并且可以使用反汇编程序和大量时间来完成此操作。

不要为这种类型的事情烦恼,它会惹恼诚实的用户,并适度减慢那些想要复制它的人的速度。 看看 World of Goo(很棒的游戏!)以及他们对 DRM 的看法(这与您正在谈论的想法类似)。

World of Goo 的开发者发现他们的产品 90% 的时间都是盗版 (他们解释了这个数字为何不准确),与另一款附带 DRM 且 92% 的盗版率的游戏形成对比。

如果您谈论的是合法企业,那么他们通常希望遵守许可证规定,因此确保他们不复制是一种浪费。 如果您谈论的是那些一开始就不会购买该产品,或者只是不想付费的人,那么您实际上并不会改变非法获取您的软件的人数,您只会减慢第一个得到它的人 - 之后秘密就泄露了。

There isn't a licensing scheme that I am aware of that is not easily breakable. I will not go into specifics, but as an example, in the Java case if it is done in Java then it can be decompiled (as can C++ or any compiled language, but Java is easier than C++ for instance). If it is done natively then you need native methods, and the DLL/so could be replaced with one that allows access.

For the C/C++ example I know someone who decompiled the CL (Microsoft compiler) to figure out how they do name mangling. All they had was the binary, and they were able to do it with a disassembler and a lot of time.

Don't bother with this type of thing, it annoys honest users and moderately slows down those that want to copy it. Take a look at World of Goo (great game!) and their take on DRM (which is a similar idea to what you are talking about).

The developers of World of Goo found that their product was pirated 90% of the time (they explain how that number could be inaccurate), contrast that to another game that shipped with DRM and was pirated 92% of the time.

If you are talking about legitimate businesses then they want to be in license compliance usually, so ensuring that they are not copying is a waste. If you are talking about people who would not buy the product to begin with, or just don't want to pay for it, you are not really going to alter the number of people that get your software illegally, you will only slow down the first person who gets it - after that the cat is out of the bag.

森林散布 2024-07-23 08:41:51

我个人认为 IntelliJ 做得对:全功能版本 30 天。 你不应该有比这更多的限制。

“功能齐全”的部分很重要。 如果你的未注册版本是如此残缺以至于毫无用处,你如何期望人们决定购买它? 他们必须尝试一些功能,然后才能决定喜欢并想要这些功能,但一些供应商认为人们会因为他们无法尝试的功能的承诺而购买某些东西,这是荒谬的。

甲骨文处于最自由的一端。 您基本上可以下载其软件的全功能版本并使用它。 他们将许可视为一个社会问题,这一论点有很多道理。

您永远不应该唠叨或以其他方式惹恼您的潜在客户(除了软件可能在预定期限后到期之外)。 您最应该发出的通知是“X 在 N 天后过期”,例如启动屏幕或其他内容。

您可以而且应该做的另一件事是为您的软件提供较低的进入门槛。

提供廉价(如果不是免费)的学术或个人版本。 营销也是一个好主意。 我的意思是,以 IntelliJ 为例:它免费提供给经过批准的开源项目。

至于执行的技术方面:不要太关心技术方面。 切勿选择任何会惹恼用户的方案,或者更糟糕的是,会减慢您的软件速度(如某些方案所做的那样)或(更糟糕的是)会违反用户操作系统的安全性(例如,索尼 rootkit 惨败)。 您的执行并不意味着可以防止黑客攻击。 如果人们想窃取您的软件,他们就会这么做。 执行系统只是对社会问题而非技术问题的温和提醒(仅此而已)。

Personally I think IntelliJ gets it right: fully-featured version for 30 days. You shouldn't be any more restrictive than that.

The "fully featured" part is important. If your unregistered version is so crippled as to be useless, how do you expect people to decide to buy it? They have to try features before they decide they like them and want them but the notion some vendors have that people will buy something on the promise of features they haven't been able to try is ludicrous.

Oracle is at the most liberal end of the spectrum. You can basically download a fully-featured version of their software and just use it. They treat licensing as a social problem and there's a lot of merit to that argument.

You should never nag or otherwise annoy your potential customers (beyond possibly expiring the software after a predetermined period). The most notice you should give is "X expires in N days" on say a splash screen or something.

The other thing you can and should do is provide a low barrier to entry for your software.

Provide a cheap (if not free) academic or personal version. Marketing is also a good idea. By this I mean take IntelliJ: it's offered free to approved open source projects.

As for the technical aspects of enforcement: don't be too concerned about the technical aspects. Never choose any scheme that annoys your users or, worse yet, slows down your software (as some schemes do) or (even worse) violates the security of the user's operating system (eg like the Sony rootkit fiasco). Your enforcement is not meant to be hack-proof. If people want to steal your software they will. The enforcement system is there as a gentle reminder (and nothing more) for a social not a technical problem.

雨落□心尘 2024-07-23 08:41:51

读完oracle的BCL(肯定了商业自由)。 然后我和甲骨文代表交谈,他说 JavaSE 可以免费用于商业用途!

After reading oracle's BCL(which affirmed commercial freedom). I then had a conversation with an oracle representative who said JavaSE is free for commercial use!.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文