bitcoinj / secp256k1-jdk

Java library providing Bitcoin-related Elliptic Curve Cryptography
Apache License 2.0
9 stars 3 forks source link

UnsatisfiedLinkError #95

Open nilskp opened 3 weeks ago

nilskp commented 3 weeks ago

Trying to run this code, from the example:

Secp256k1 secp = Secp256k1.get();

On graalvm-jdk-22.0.1+8.1 with secp256k1-foreign:0.0.1 and secp256k1-api:0.0.1 in the classpath.

Getting:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no secp256k1 in java.library.path

What am I missing?

msgilligan commented 1 week ago

Sorry, just now seeing this. You need to have the secp256k1 native library in your java.library.path (which is where native libraries are searched for) I think this is covered in the README. I should be releasing 0.0.2 soon, so try again when that is released.

nilskp commented 1 week ago

Ok, and where do I find that?

msgilligan commented 1 week ago

Ok, and where do I find that?

The README explains how to install it with Nix. But you can also find the source here: https://github.com/bitcoin-core/secp256k1