Package net.sourceforge.jnlp.cache
Class NativeLibraryStorage
java.lang.Object
net.sourceforge.jnlp.cache.NativeLibraryStorage
Handles loading and access of native code loading through a JNLP application or applet.
Stores native code in a temporary folder.
Be sure to call cleanupTemporayFolder when finished with the object.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSearchDirectory
(File directory) Adds theFile
to the search path of thisNativeLibraryStorage
when trying to find a native libraryvoid
addSearchJar
(URL jarLocation) Search for and enable any native code contained in a JAR by copying the native files into the filesystem.void
Clean up our temporary folder if we created one.findLibrary
(String fileName) Looks in the search directories for 'fileName', returning a path to the found file if it exists.
-
Field Details
-
NATIVE_LIBRARY_EXTENSIONS
-
-
Constructor Details
-
NativeLibraryStorage
-
-
Method Details
-
cleanupTemporaryFolder
public void cleanupTemporaryFolder()Clean up our temporary folder if we created one. -
addSearchDirectory
Adds theFile
to the search path of thisNativeLibraryStorage
when trying to find a native library- Parameters:
directory
- directory to be added
-
getSearchDirectories
-
findLibrary
Looks in the search directories for 'fileName', returning a path to the found file if it exists.- Parameters:
fileName
- name of library to be found- Returns:
- path to library if found, null otherwise.
-
addSearchJar
Search for and enable any native code contained in a JAR by copying the native files into the filesystem. Called in the security context of the classloader.- Parameters:
jarLocation
- location of jar to be searched
-