diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-02-18 14:22:19 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-02-18 14:22:19 +0100 |
commit | 7f94c08c07b053d10b8d1d55f8a6d969119f3ab1 (patch) | |
tree | 64bc66f4c365aa241ca6a120b540dfe455363847 | |
parent | jni version, just needs to properly load the lib (diff) | |
download | sha3sum-7f94c08c07b053d10b8d1d55f8a6d969119f3ab1.tar.gz sha3sum-7f94c08c07b053d10b8d1d55f8a6d969119f3ab1.tar.bz2 sha3sum-7f94c08c07b053d10b8d1d55f8a6d969119f3ab1.tar.xz |
jni error
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | java-c-jni/SHA3.java | 12 |
1 files changed, 11 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. */ +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); } + |