1

How can I distinguish between the following scenarios using a Javascript test in browser?

  1. Java is installed but disabled
  2. Java is not installed at all

I have checked deployJava.js and navigator.javaEnabled() but they seem to return false in both scenarios if I disable JAVA using JAVA control panel in Windows.

deployJava.versionCheck("1.5+") //false

navigator.javaEnabled() //false

Thanks for your help.

P.S. I checked similar answers but they all are related to detecting to some other version of JAVA. I just need to know which of the above mentioned state occurs.

3
  • Question is not about detecting the version of java. I know how to do that. My question is how do i tell if java is disabled by user or its not installed at all. Commented Apr 10, 2013 at 9:18
  • My apologies, I judged too fast. Have you checked getJREs();? Commented Apr 10, 2013 at 9:20
  • @TimS. No prob.Yeah i checked that but it returns [] empty object if disabled Commented Apr 10, 2013 at 9:23

1 Answer 1

1

From the browser, there's no way to differentiate between the two cases you mention. When you disable java using the control panel, then it doesn't get loaded into the browser, and so the browser cannot tell you if it's installed or not.

You would have a similar issue with other plugins if they had an on-off switch of that form.

Sign up to request clarification or add additional context in comments.

2 Comments

Is it possible using an applet?
The applet would never be loaded in either case (disabled, not installed) so you still could not tell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.