Reputation: 632
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
Reputation: 7706
Do
System.out.println(System.getProperty("java.library.path"));
and put your dll in the java.library.path path.
Upvotes: 2