开发者

How can I have my website check the visitor's java installation and offer to update or install it?

开发者 https://www.devze.com 2023-03-11 09:40 出处:网络
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.

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.

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.

How can I check that Java is running, and pop in a warning message with a link to download Java if the check fails? The site is mainly written in PHP, if that matters (I d开发者_开发知识库on't see why it would).


Sigh, well, whatever the deal is with donating CPU power, you can use http://java.com/js/deployJava.js, then

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消