Example #1
0
 internal virtual void LoadLibrary0(Class fromClass, String libname)
 {
     lock (this)
     {
         SecurityManager security = System.SecurityManager;
         if (security != null)
         {
             security.CheckLink(libname);
         }
         if (libname.IndexOf((int)System.IO.Path.DirectorySeparatorChar) != -1)
         {
             throw new UnsatisfiedLinkError("Directory separator should not appear in library name: " + libname);
         }
         ClassLoader.LoadLibrary(fromClass, libname, false);
     }
 }
Example #2
0
 internal virtual void Load0(Class fromClass, String filename)
 {
     lock (this)
     {
         SecurityManager security = System.SecurityManager;
         if (security != null)
         {
             security.CheckLink(filename);
         }
         if (!((new File(filename)).Absolute))
         {
             throw new UnsatisfiedLinkError("Expecting an absolute path of the library: " + filename);
         }
         ClassLoader.LoadLibrary(fromClass, filename, true);
     }
 }