Search code examples
javaasp.netappletversion-detection

How can I detect the Java runtime installed on a client from an ASP .NET website?


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?

Thanks,

Carl.

EDIT: The solution must be platform independant.


Solution

  • 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
    }