URL
https://opencores.org/ocsvn/usb_fpga_1_2/usb_fpga_1_2/trunk
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 3 |
Line 9... |
Line 9... |
package ch.ntb.usb;
|
package ch.ntb.usb;
|
|
|
import java.io.*;
|
import java.io.*;
|
|
|
/**
|
/**
|
* This class allows to load libraries in the normal way or as a system resource.
|
* This class allows to load libraries in the normal way or as a system resource (e.g. form the current .jar file).
|
* See below for a further description. <br>
|
* See below for a further description. <br>
|
*
|
*
|
* @author Stefan Ziegenbalg
|
* @author Stefan Ziegenbalg
|
*
|
*
|
*/
|
*/
|
public class LibLoader {
|
public class LibLoader {
|
|
|
/**
|
/**
|
* Loads a library. This is done in three steps.<br>
|
* Loads a library. This is done in three steps.<br>
|
* 1. The library is tried to be load from the path list specified by the java.library.path proterty. <br>
|
* 1. The library is tried to be load from the path list specified by the java.library.path property. <br>
|
* 2. The library is tried to be load from the currrent directory. <br>
|
* 2. The library is tried to be load from the current directory. <br>
|
* 3. The library is searched as a system ressource (e.g. in the current .jar file),
|
* 3. The library is searched as a system resource (e.g. in the current .jar file),
|
* copied to te temporary directory and loaded from there. Afterwards the temporary library is deleted.
|
* copied to to temporary directory and loaded from there. Afterwards the temporary library is deleted.
|
* The copying is necessary because libraries cant be loeaded directly from .jar files.<br>
|
* The copying is necessary because libraries can't be loaded directly from .jar files.<br>
|
*
|
*
|
* @param libName Library name (e.g. usbJava)
|
* @param libName Library name (e.g. usbJava)
|
*
|
*
|
* @throws UnsatisfiedLinkError
|
* @throws UnsatisfiedLinkError
|
*
|
*
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.