public class Librarian extends Object implements CleanupClient
Librarian per Java runtime, therefore this class is implemented as a 'Singleton'.
Librarian is capable of loading native libraries from a variety of different
source locations. However, you should place your library files in the 'native' directory. The
primary reason for supporting different source locations is to facilitate testing in a
development environment, without the need to actually packing the application into a *.jar file.| Constructor and Description |
|---|
Librarian(TargetFactory factory,
Housekeeper housekeeper)
Constructs a Librarian.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
This method attempts to remove all native libraries that have been temporarily created from
the system.
|
protected URL |
getResourcePath(String name)
Returns the resource URL for the named library.
|
void |
loadLibrary(String name,
NativeLibraryClient client)
Loads a library.
|
public Librarian(TargetFactory factory, Housekeeper housekeeper)
factory - the factoryhousekeeper - the house keeperpublic void loadLibrary(String name, NativeLibraryClient client) throws UnsatisfiedLinkError
name - the library nameclient - the native library clientUnsatisfiedLinkError - if the library cannot be loadedpublic void cleanUp()
cleanUp in interface CleanupClientCopyright © 2001–2025. All rights reserved.