Is Java enabled?

JavaScript FAQ | Client & Browser Configuration FAQ  

Question: Can JavaScript code determine whether Java is enabled?

Answer: Yes. To do so, use the

method. This method is supported in all major browsers (Internet Explorer, Firefox, Opera, Safari, Google Chrome).

Here's an example:

var javaOK = navigator.javaEnabled();

if (javaOK) document.write(''
  + 'Java is enabled: \n'
  + 'javaEnabled() returned '
  + javaOK.toString().bold()
else document.write(''
  + 'Java is NOT enabled: \n'
  + 'javaEnabled() returned '
  + javaOK.toString().bold()
In your browser, this code produces the following result:

See also:

Copyright © 1996-2018,