My code dynamically resolves native libraries location, however I can't use System.load("complete path") because the libraries are loaded in 3rd party Java code. So if I even preload libraries, 3rd party code fails with unsatisfied link error. An attempt to overwrite "java.library.path" doesn't work either.
I looked in System.setProperty and java.lang.ClassLoader.loadLibrary source and didn't find an answer. Yes, after every reload properties, class System does native call to initialize default values, however it doesn't happen for setProperty call. loadLibrary doesn't do any magic either, it does read property from System and trying to locate native libraries. So where is the magic? I do not want to debug java.lang package, hoping that somebody knows a solution here.