net.java.dev.openqtj.util
Class LibLoader

java.lang.Object
  extended bynet.java.dev.openqtj.util.LibLoader

public class LibLoader
extends java.lang.Object

LibLoader This utility class will be responsible for loading the correct native libraries on various platforms as transparently as possible. For now, on Mac OS X only, it will extract named libraries out of a JAR put them in a temporary file and load them. TODO: Windows support. Inspired by this ACM paper: http://portal.acm.org/citation.cfm?id=957303&jmp=references&dl=GUIDE&dl=ACM

Author:
Sean Gilligan

Constructor Summary
LibLoader()
           
 
Method Summary
static boolean loadLibrary(java.lang.String name)
          loadLibrary Extract a native library for the current OS from one of the application's JAR files, place in a temporary file, and load it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LibLoader

public LibLoader()
Method Detail

loadLibrary

public static boolean loadLibrary(java.lang.String name)
loadLibrary Extract a native library for the current OS from one of the application's JAR files, place in a temporary file, and load it. (Checks HashMap to make sure the library wasn't previously loaded, before proceeding.)

Parameters:
name - - name of library (correct prefix and extension will be added)
Returns:
boolean indicating if library was successfully loaded.


Copyright © 2004 OpenQTJ.org. All Rights Reserved.