holy
holy

Reputation: 632

JNI in eclipse:Running the Java code


the problem is:when i am running the Java code an error occurs:Exception in thread "main" java.lang.UnsatisfiedLinkError: no sample \\(library:sample.dll)\\ in java.library.path.
It seems that the library file is not accessible to the JVM.
How to ensure that the library file's location is in the classpath?
Thanks.

Upvotes: 1

Views: 182

Answers (1)

Java42
Java42

Reputation: 7706

Do

System.out.println(System.getProperty("java.library.path"));

and put your dll in the java.library.path path.

Upvotes: 2

Related Questions