improve library load debugging
Esse commit está contido em:
@@ -818,6 +818,9 @@ public final class Native implements Version {
|
||||
}
|
||||
throw new IOException("Native library (" + resourcePath + ") not found in resource path (" + path + ")");
|
||||
}
|
||||
if (DEBUG_LOAD) {
|
||||
System.out.println("Found library resource at " + url);
|
||||
}
|
||||
|
||||
File lib = null;
|
||||
if (url.getProtocol().toLowerCase().equals("file")) {
|
||||
@@ -835,10 +838,6 @@ public final class Native implements Version {
|
||||
}
|
||||
}
|
||||
else if (!Boolean.getBoolean("jna.nounpack")) {
|
||||
if (Native.DEBUG_LOAD) {
|
||||
System.out.println("Looking in " + resourcePath);
|
||||
}
|
||||
|
||||
InputStream is = loader.getResourceAsStream(resourcePath);
|
||||
if (is == null) {
|
||||
throw new IOException("Can't obtain InputStream for " + resourcePath);
|
||||
|
||||
@@ -256,6 +256,7 @@ public class NativeLibrary {
|
||||
try {
|
||||
File embedded = Native.extractFromResourcePath(libraryName, (ClassLoader)options.get(Library.OPTION_CLASSLOADER));
|
||||
handle = Native.open(embedded.getAbsolutePath());
|
||||
libraryPath = embedded.getAbsolutePath();
|
||||
// Don't leave temporary files around
|
||||
if (Native.isUnpacked(embedded)) {
|
||||
Native.deleteLibrary(embedded);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário