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, getTempDir
public 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.IOException
protected void finalize() throws Throwable
public File getJniDir()
BaseJniExtractor
getJniDir
in class BaseJniExtractor
public File getNativeDir()
BaseJniExtractor
getNativeDir
in class BaseJniExtractor
Copyright © 2015–2022 SciJava. All rights reserved.