removed securityException caused by accessing class directly from sun. package
authorjprocter <Jim Procter>
Tue, 18 Jan 2011 10:42:20 +0000 (10:42 +0000)
committerjprocter <Jim Procter>
Tue, 18 Jan 2011 10:42:20 +0000 (10:42 +0000)
src/jalview/bin/JalviewLite.java

index dd2bf70..0fb0662 100755 (executable)
@@ -842,13 +842,16 @@ public class JalviewLite extends Applet
     // remove any handlers that might be hanging around from an earlier instance
     try
     {
-      if (getAppletContext() instanceof sun.plugin.javascript.JSContext) {
-        if (debug)
-        {
-          System.err.println("Applet context implements JSContext - should have callback support!");
-        }
+      if (debug)
+      {
+        System.err.println("Applet context is '"+getAppletContext().getClass().toString()+"'");
+      }
+      JSObject scriptObject = JSObject.getWindow(this);
+      if (debug && scriptObject!=null)
+      {
+        System.err.println("Applet has Javascript callback support.");
       }
-       JSObject scriptObject = JSObject.getWindow(this);  
+      
     } catch (Exception ex)
     {
       System.err