Skip to content

Commit

Permalink
Native lib loading refactor (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIMP authored Oct 1, 2024
1 parent 77ca2f8 commit c8fede9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zenoh-kotlin/src/jvmMain/kotlin/io/zenoh/Zenoh.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ internal actual object ZenohLoad {
}

private fun loadLibraryAsInputStream(target: Target): Result<InputStream> = runCatching {
val libUrl = ClassLoader.getSystemClassLoader().getResourceAsStream("$target/$target.zip")!!
val libUrl = javaClass.getResourceAsStream("$target/$target.zip")!!
val uncompressedLibFile = unzipLibrary(libUrl)
return Result.success(FileInputStream(uncompressedLibFile.getOrThrow()))
}
Expand Down

0 comments on commit c8fede9

Please sign in to comment.