Skip to content

Commit ad6c62a

Browse files
committed
chore(platform): Added loading native library with extension .so as default
1 parent 1b5596e commit ad6c62a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/example/adblock/LoadLibraryHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ private static String buildLibraryPath() throws RustException {
6060
* This method generate extension by current system platform.
6161
*
6262
* @return String A native library extension by system platform.
63-
* @throws RustException throws if failed to detect system platform.
6463
*/
65-
private static String buildLibraryExtension() throws RustException{
64+
private static String buildLibraryExtension() {
6665
String osName = System.getProperty("os.name").toLowerCase();
6766
if (osName.contains("windows")) {
6867
return ".dll";
6968
} else if (osName.contains("mac os x")) {
7069
return ".dylib";
71-
} else if (osName.contains("linux")) {
70+
} if (osName.contains("linux")) {
7271
return ".so";
7372
} else {
74-
throw new RustException("Unsupported OS: " + osName);
73+
System.err.println("Unsupported OS: " + osName);
74+
return ".so";
7575
}
7676
}
7777

0 commit comments

Comments
 (0)