public class WebappJniExtractor extends BaseJniExtractor
Designed to avoid the restriction that jni library can be loaded by at most one classloader at a time.
Works by extracting each library to a different location for each classloader.
WARNING: This can expose strange and wonderful bugs in jni code. These bugs generally stem from transitive dependencies of the jni library and can be solved by linking these dependencies statically to form a single library
ALTR_TMPDIR, JAVA_TMPDIR, TMP_PREFIX| Constructor and Description |
|---|
WebappJniExtractor(String classloaderName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
File |
getJniDir()
this is where JNI libraries are extracted to (e.g.
|
File |
getNativeDir()
this is where native dependencies are extracted to (e.g.
|
extractJni, extractRegistered, getTempDirpublic WebappJniExtractor(String classloaderName) throws IOException
classloaderName - is a friendly name for your classloader which will
be embedded in the directory name of the classloader-specific
subdirectory which will be created.IOExceptionprotected void finalize()
throws Throwable
public File getJniDir()
BaseJniExtractorgetJniDir in class BaseJniExtractorpublic File getNativeDir()
BaseJniExtractorgetNativeDir in class BaseJniExtractorCopyright © 2015–2022 SciJava. All rights reserved.