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
cleanupTemporaryFolder() when finished with the object.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSearchDirectories(List<File> directories) Adds theFiles to the search path of thisNativeLibraryStoragewhen trying to find a native libraryvoidaddSearchJar(URL jarLocation) Search for and enable any native code contained in a JAR by copying the native files into the filesystem.voidClean up our temporary folder if we created one.private static FileCreate a random base directory to store native code files in.findLibrary(String fileName) Looks in the search directories for 'fileName', returning a path to the found file if it exists.(package private) File
-
Field Details
-
LOG
-
RANDOM
-
NATIVE_LIB_EXT_DYLIB
- See Also:
-
NATIVE_LIB_EXT_JNILIB
- See Also:
-
NATIVE_LIBRARY_EXTENSIONS
-
tracker
-
nativeSearchDirectories
-
jarEntryDirectory
Temporary directory to store native jar entries, added to our search path
-
-
Constructor Details
-
NativeLibraryStorage
-
-
Method Details
-
cleanupTemporaryFolder
public void cleanupTemporaryFolder()Clean up our temporary folder if we created one. -
addSearchDirectories
Adds theFiles to the search path of thisNativeLibraryStoragewhen trying to find a native library- Parameters:
directories- directories to be added
-
getSearchDirectories
-
findLibrary
-
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
-
getNativeStoreDirectory
File getNativeStoreDirectory() -
createNativeStoreDirectory
Create a random base directory to store native code files in.
-