org.firebirdsql.gds.impl.jni
Class DynamicLibraryLoader

java.lang.Object
  extended by org.firebirdsql.gds.impl.jni.DynamicLibraryLoader

public class DynamicLibraryLoader
extends Object


Constructor Summary
DynamicLibraryLoader()
           
 
Method Summary
static boolean loadLibraryFromClassPath(String libraryName)
          Load the library from the classpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicLibraryLoader

public DynamicLibraryLoader()
Method Detail

loadLibraryFromClassPath

public static boolean loadLibraryFromClassPath(String libraryName)
                                        throws IOException
Load the library from the classpath. This method will check whether the classpath contains the specified library. If no library can be found, false is returned. However, when classpath contains the requested library, its content is copied into the temporary file and this file is later loaded using the Runtime.load(java.lang.String) method.

Parameters:
libraryName - name of the library to load. This name is translated into the platform-depended name using the System.mapLibraryName(java.lang.String) method. The new name is used to search the library in the path.
Returns:
true if library was found in the classpath and was successfully loaded into the JVM.
Throws:
IOException - If I/O error occured during the operation.


Copyright © 2001-2010. All Rights Reserved.