[英]How can I have my website check the visitor's java installation and offer to update or install it?
I made a website (well, a pair of websites: MiningForJapan.org and MiningForJoplin.org ) that allow visitors to contribute to a Bitcoin Mining Pool to benefit Red Cross relief efforts.我创建了一个网站(嗯,两个网站: MiningForJapan.org和MiningForJoplin.org ),允许访问者为比特币矿池捐款,以帮助红十字会的救援工作。
Anyway, the bitcoin mining code relies on the user's browser having an up-to-date and enabled Java runtime plugin, and the site doesn't look any different when it's not working.无论如何,比特币挖掘代码依赖于用户的浏览器具有最新并启用 Java 运行时插件,并且该站点在不工作时看起来没有任何不同。
How can I check that Java is running, and pop in a warning message with a link to download Java if the check fails?如何检查 Java 是否正在运行,并在检查失败时弹出带有下载 Java 链接的警告消息? The site is mainly written in PHP, if that matters (I don't see why it would).该站点主要用 PHP 编写,如果这很重要(我不明白为什么会这样)。
Sigh, well, whatever the deal is with donating CPU power, you can use http://java.com/js/deployJava.js , then叹息,好吧,无论捐赠 CPU 功率是什么,您都可以使用http://java.com/js/deployJava.js ,然后
if (!deployJava.versionCheck("1.0")) {
// Let pre-v1.0 users know what they're missing
}
The correct solution is to offer them a link to Java 's download page, of course.当然,正确的解决方案是为他们提供Java下载页面的链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.