How to check if Java plugins are installed or not in the browser using code.?

How to check if Java plugins are installed in the browser using java or javascript or JSP code.?

+6
source share
5 answers

Java / Sun / Oracle provides a set of script deployment tools in the form of a JavaScript file that allows you to achieve what you need.

You can call the getJREs() function, which returns an array of the current version string of the JRE version.

You can even install a specific version of the JRE, if you need, using the installJRE(requestVersion) function.

+7
source

Use deployJava.js to verify java installation.

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <SCRIPT LANGUAGE="JavaScript" src="deployJava.js"> </SCRIPT> <script type="text/javascript"> function call() { if (deployJava.versionCheck("1.6.0+") || deployJava.versionCheck("1.4") || deployJava.versionCheck("1.5.0*")) { alert("Java is Enabled"); } else { alert("Java is Not Enabled"); } } </script> <BODY onload="call();"> </BODY> </HTML> 
+3
source

Try the following:

https://cdnjs.com/libraries/jqplugin

Eg.

 jQuery.browser.java //Java 
+1
source

I first tried jqplugin and deployJava, but at least for IE8 this did not work. So I came through this library, which has the most complete documentation and implementation that I could find and worked for the whole browser, which I could check

http://www.pinlady.net/PluginDetect/Java/

+1
source

From Navigator javaEnabled () : var x = "Java Enabled: " + navigator.javaEnabled();

The result of x will be: Java Enabled: false

+1
source

Source: https://habr.com/ru/post/885702/


All Articles