5

I need to be able to determine if a user has Java installed and enabled through JavaScript. The 1st requirement is easily done, I'm using the deployment toolkit script:

http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html

However, in the situation where a user has java installed, but they have disabled it (NOT disabled support in the browser, but disabled via the java control panel in Windows), the installed versions still show up in calls to deployJava.getJREs(). Is there any way to detect versions of Java that are both installed AND enabled using JavaScript?

4
  • @John, i think what the op wants is a way to detect browser version of JAVA with javascript Commented Apr 21, 2011 at 16:05
  • try the good old run some Java, try to connect to javascript through java then detect whether that connection is open. Commented Apr 21, 2011 at 16:09
  • @Neal, I've already managed to get a list of java versions available. I just need to be able to detect when those versions have been disabled. Maybe that's not possible, I kind of figured it was a long shot. The reason I need this is so I can determine if I can successfully embed an applet into the page. Commented Apr 21, 2011 at 16:12
  • @John - That's a cute phrase, but how does it apply here? Commented Apr 21, 2011 at 18:29

1 Answer 1

3

See Detect if an applet is ready at Real's HowTo. AFAIU that should only be true once the applet is loaded and started.

There are also ways to call applet methods directly from JavaScript, if the first technique fails, you might look to that in order to ensure the applet is both loaded and working.


Another approach is to set a meta-refresh redirect element in the HTML, then have the applet call a JS to cancel the redirect if it loads successfully. The idea would be to set the href of the redirect to point to a page with words to the effect 'Sorry, our applet failed to load within NN seconds. Click -here- for support.'

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

Comments

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.