package jas2.jds.module;
/**
* @deprecated Use System.loadLibrary directly.
* Using this class turns out to be a bad idea, since it is loaded by the
* base classloader, libraries loaded by it are only accessible to the base
* class loader. Extensions should call System.loadLibrary directly to avoid this.
*/
public class ModuleUtilities
{
/**
* Use this instead of System.loadLibrary to load libraries for modules.
* It throws a module exception if the library cannot be loaded.
*/
public static void loadLibrary(String libName) throws ModuleException
{
try
{
System.out.println("Loading "+libName+" ...");
System.loadLibrary(libName);
}
catch (Throwable t)
{
throw new ModuleException("Error loading native library: "+libName,t);
}
}
}
Ads help maintain this website.