Pete E.
Pete E.

Reputation: 173

How to detect if browser will block java applet due to a need for update

In general, browsers (I see this esp. with Safari) are kind enough to inhibit a Java applet from running if it senses that a security related update for Java exists. It seems to do this quietly... my applet just "sits-and-spins" in the browser window - never executes. Is there a way, preferably via JavaScript, to programmatically determine whether or not this condition will exist (so that, for example, applet loading can be skipped and some kind of informational message can be displayed)?

In my particular case, my applet quietly did nothing when launched with Java 1.6.0_37 (on Mac OSX 10.6, Safari 5.1.7). As soon as I updated to Java 1.6.0_43, the applet ran without incident.

Upvotes: 2

Views: 810

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168845

The best approach is generally to poll for the existence of the applet using Javascript, and take alternate action after a specific time.

Note that the Deployment Toolkit Script is intended to ensure a valid Java version and run the applet while providing feed-back to the user, so it would be a better overall approach to deploying the applet.

Upvotes: 1

Related Questions