开发者

Detecting if java is installed and enabled with javascript

I need to be able to determine if a user has Java installed and enabled through JavaScript. The 1st requirement is easily done, I'm using the deployment toolkit script:

http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html

However, in the situation where a user has java instal开发者_JAVA技巧led, but they have disabled it (NOT disabled support in the browser, but disabled via the java control panel in Windows), the installed versions still show up in calls to deployJava.getJREs(). Is there any way to detect versions of Java that are both installed AND enabled using JavaScript?


See Detect if an applet is ready at Real's HowTo. AFAIU that should only be true once the applet is loaded and started.

There are also ways to call applet methods directly from JavaScript, if the first technique fails, you might look to that in order to ensure the applet is both loaded and working.


Another approach is to set a meta-refresh redirect element in the HTML, then have the applet call a JS to cancel the redirect if it loads successfully. The idea would be to set the href of the redirect to point to a page with words to the effect 'Sorry, our applet failed to load within NN seconds. Click -here- for support.'

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜