Detect if Java 1.1 (with event delegation) is availableTag(s): Javascript interaction


On some version of Netscape (eg.4.03), even if the JDK1.1 is reported as the Java version, you need to apply a special patch to upgrade to the event delegation model. Here how you can detect if the patch has been applied.
function isJava11Available() {
  if (java.awt.event.MouseEvent)
     return true;
  else
     return false;
}

Someone at Netscape suggests a better way to check :

function isJava11Available(){
  if (java.awt.event.MouseEvent == "[JavaClass java/awt/event/MouseEvent]")
     return true;
  return false;
}
because Unknown Java classes are reflected as JavaPackages, for reasons related to the fact that there's no way to tell if something is a valid package.
blog comments powered by Disqus