mirror of https://github.com/apache/nifi.git
NIFI-1302 find dynamic libraries with standard names
Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
04e9606770
commit
f239be289e
|
@ -206,14 +206,15 @@ public class NarClassLoader extends URLClassLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
final File nativeDir = new File(dependencies, "native");
|
final File nativeDir = new File(dependencies, "native");
|
||||||
final File soFile = new File(nativeDir, libname + ".so");
|
final File libsoFile = new File(nativeDir, "lib" + libname + ".so");
|
||||||
if (soFile.exists()) {
|
|
||||||
return soFile.getAbsolutePath();
|
|
||||||
} else {
|
|
||||||
final File dllFile = new File(nativeDir, libname + ".dll");
|
final File dllFile = new File(nativeDir, libname + ".dll");
|
||||||
if (dllFile.exists()) {
|
final File soFile = new File(nativeDir, libname + ".so");
|
||||||
|
if (libsoFile.exists()) {
|
||||||
|
return libsoFile.getAbsolutePath();
|
||||||
|
} else if (dllFile.exists()) {
|
||||||
return dllFile.getAbsolutePath();
|
return dllFile.getAbsolutePath();
|
||||||
}
|
} else if (soFile.exists()) {
|
||||||
|
return soFile.getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
// not found in the nar. try system native dir
|
// not found in the nar. try system native dir
|
||||||
|
|
Loading…
Reference in New Issue