Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check whether Java plugins are installed or not in a browser using Code .?

How to check whether Java plugins are installed or not in a browser using java or javascript or JSP Code .?

like image 883
SSN Avatar asked Apr 12 '11 06:04

SSN


2 Answers

Use deployJava.js to check the 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>
like image 22
Dead Programmer Avatar answered Oct 24 '22 03:10

Dead Programmer


Java/Sun/Oracle provides a deployment toolkit script in the form of a JavaScript file that lets you achieve what you need.

You could invoke the getJREs() function which returns an array of currently-installed JRE version strings.

You can even install a particular JRE version if you need to, via the installJRE(requestVersion) function.

like image 183
Ryan Fernandes Avatar answered Oct 24 '22 04:10

Ryan Fernandes