Skip to content

Commit e2c3de2

Browse files
committed
1.27
1 parent eb2a68f commit e2c3de2

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66

77
group 'dev.felnull'
88
archivesBaseName = "felnull-java-library"
9-
version '1.26'
9+
version '1.27'
1010

1111
repositories {
1212
mavenCentral()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dev.felnull.fnjl;
22

33
public class BuildIn {
4-
protected static final String VERSION = "1.26";
4+
protected static final String VERSION = "1.27";
55

66
protected static final int NATIVE_LIB_VERSION = 3;
77
}

src/main/java/dev/felnull/fnjl/jni/NativeFileChooser.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ public NativeFileChooser(String title, Flag flags, Filter... filters) {
3333
this.filters = filters;
3434
}
3535

36+
private static boolean init() {
37+
NativeLibraryManager.loadLibrary();
38+
return !NativeLibraryManager.isLoadFailure();
39+
}
40+
3641
public static boolean isSupport() {
42+
if (!init())
43+
return false;
3744
return OSs.isWindows() && OSs.isX64();
3845
}
3946

src/main/java/dev/felnull/fnjl/jni/NativeLibraryManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ private static void extractLibrary(OSs.Type os, String aarch) throws IOException
106106
InputStream stream = loadResource(pp);
107107

108108
if (stream == null && relocatePath != null)
109-
stream = loadResource(relocatePath + "/" + libname);
109+
stream = loadResource(relocatePath + "/" + pp);
110110

111111
if (stream == null)
112-
throw new IOException("Library does not exist");
112+
throw new IOException("Library does not exist: " + pp + (relocatePath != null ? (" and " + relocatePath + "/" + pp) : ""));
113113

114114
String name = "FNJL" + FelNullJavaLibrary.getNativeLibVersion() + aarch + "." + os.getLibName();
115115
Path path = getNativeLibraryFolder().resolve(name);

0 commit comments

Comments
 (0)