Runtime.loadLibrary
is implemented in terms of dlopen
and LoadLibrary
.
From dlopen's man page: "If filename contains a slash ("/"), then it is interpreted as a (relative or absolute) pathname."
From LoadLibrary's MSDN page: "If the string specifies a full path, the function searches only that path for the module."
So all you have to do is pass a full path to loadLibrary and it should just work (assuming loadLibrary works at all, tbh i'm not sure it is implemented fully in the current release).