diff options
-rw-r--r-- | flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala b/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala index 2526293..dc539ea 100644 --- a/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala +++ b/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala @@ -42,10 +42,12 @@ object NativeLoader { private def loadFromJar(library: String) = { val fqlib = System.mapLibraryName(library) //fully qualified library name - extract(s"/native/${os}-${arch}/${fqlib}", fqlib) match { + val path = s"/native/${os}-${arch}/${fqlib}" + extract(path, fqlib) match { case Some(file) => System.load(file.getAbsolutePath) case None => throw new UnsatisfiedLinkError("Cannot extract flow's native library, " + - "the native library may not exist for your specific architecture/OS combination.") + "the native library does not exist for your specific architecture/OS combination." + + "Could not find " + path + ".") } } @@ -55,4 +57,4 @@ object NativeLoader { case ex: UnsatisfiedLinkError => loadFromJar(library) } -}
\ No newline at end of file +} |