简体   繁体   English

如何让我的网站检查访问者的 java 安装并提供更新或安装它?

[英]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.orgMiningForJoplin.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.

相关问题 如何在Mac上更新Java版本,以便可以安装Eclipse? - How can I update my Java version on my Mac so I can install Eclipse? 如何获取Java中应用程序的安装路径? - How can i get application's installation path in Java? Android Studio Java:如果产品已经存在于我的购物车活动中,我该如何更新我的数量? - Android Studio Java: How can I update my quantity if the product already exist's in my Cart Activity? 如何检查 apk 文件是否已安装在我的模拟器中? - How can i check apk file is already install in my Emulator? 如何连接到我的网站数据库? java的 - How can I connect to my website database? java 如何将加工草图作为JAVA小程序放置在我的网站上? - How can I put a processing sketch on my website as a a JAVA applet? 如何使用Java检查Excel文件中是否有更新 - How can I check if there is an update in Excel file using java 如何检查数组列表中的元素是否不在哈希图中? - How can I check if there's element in my arraylist that is not in the hashmap? 在AST访问者中,我如何知道我正在访问哪个节点的属性? - In an AST Visitor, how can I know which node's property I am visiting? Java-如何检查场景是否处于全屏模式? - Java - How can I check if my scene is in full screen mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM