From 7f94c08c07b053d10b8d1d55f8a6d969119f3ab1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 18 Feb 2013 14:22:19 +0100 Subject: jni error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- java-c-jni/SHA3.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/java-c-jni/SHA3.java b/java-c-jni/SHA3.java index 3d5ce2a..afcb942 100644 --- a/java-c-jni/SHA3.java +++ b/java-c-jni/SHA3.java @@ -16,6 +16,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +import java.io.*; +import java.util.*; /** @@ -40,7 +42,14 @@ public class SHA3 */ static { - System.loadLibrary("SHA3"); + try + { + System.load((new File("./SHA3.so")).getCanonicalPath()); + } + catch (IOException err) + { + throw new Error("SHA3 library cannot be found"); + } } @@ -104,3 +113,4 @@ public class SHA3 public static native byte[] digest(byte[] msg, int msglen); } + -- cgit v1.2.3-70-g09d2