如何从 ASP .NET 网站检测客户端上安装的 Java 运行时? [英] How can I detect the Java runtime installed on a client from an ASP .NET website?
问题描述
我有一个托管 Java 小程序的 ASP .NET 网站.Java 小程序需要 Java 运行时的 1.6 Update 11 版.
I have an ASP .NET website that hosts a Java applet. The Java applet requires version 1.6 Update 11 of the Java runtime.
如何检测客户端是否安装了适当的运行时,以便在没有安装时显示信息性消息?
How can I detect that a client has the appropriate runtime installed so that I can display an informative message if they do not?
谢谢,
卡尔.
解决方案必须独立于平台.
The solution must be platform independant.
推荐答案
此页面描述了如何使用 JavaScript 检测 Java 并列出了一些插件:http://www.pinlady.net/PluginDetect/JavaDetect.htm
This page describes how to and lists some plugins that will allow you to detect Java with JavaScript: http://www.pinlady.net/PluginDetect/JavaDetect.htm
除此之外,也试试这个片段:
Other than that, try out this snippet as well:
if (navigator.javaEnabled()) {
//Java is enabled
}
这篇关于如何从 ASP .NET 网站检测客户端上安装的 Java 运行时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!