import java.awt.event.ComponentListener;\r
import java.io.File;\r
import java.net.URL;\r
+import java.security.AccessControlException;\r
import java.util.Enumeration;\r
import java.util.Hashtable;\r
import java.util.Map;\r
String m=viewer.getModelFileName(0);\r
if (m!=null)\r
{\r
- mset[0] = new File(m).getAbsolutePath();\r
+ try {\r
+ mset[0] = new File(m).getAbsolutePath();\r
+ } catch (AccessControlException x) {\r
+ // usually not allowed to do this in applet, so keep raw handle\r
+ mset[0] = m;\r
+ //System.err.println("jmolBinding: Using local file string from Jmol: "+m); \r
+ }\r
}\r
for (int i = 1; i < mset.length; i++)\r
{\r
m=viewer.getModelFileName(i);\r
if (m!=null) {\r
- mset[j] = new File(m).getAbsolutePath();\r
+ try {\r
+ mset[j] = new File(m).getAbsolutePath();\r
+ } catch (AccessControlException x) {\r
+ // usually not allowed to do this in applet, so keep raw handle\r
+ mset[j] = m;\r
+ //System.err.println("jmolBinding: Using local file string from Jmol: "+m); \r
+ }\r
}\r
_modelFileNameMap[j] = i; // record the model index for the filename\r
// skip any additional models in the same file (NMR structures)\r