This commit is contained in:
artdeell 2021-08-20 15:53:43 +03:00
parent 9227659f47
commit 80b5c55a64

View File

@ -45,7 +45,18 @@ public class JREUtils {
}
public static String findInLdLibPath(String libName) {
if(Os.getenv("LD_LIBRARY_PATH")==null) return libName;
if(Os.getenv("LD_LIBRARY_PATH")==null) {
try {
if (LD_LIBRARY_PATH != null) {
Os.setenv("LD_LIBRARY_PATH", LD_LIBRARY_PATH, true);
}else{
return libName;
}
}catch (ErrnoException e) {
e.printStackTrace();
return libName;
}
}
for (String libPath : Os.getenv("LD_LIBRARY_PATH").split(":")) {
File f = new File(libPath, libName);
if (f.exists() && f.isFile()) {