3

HI ALL,

I got an error java.lang.UnsatisfiedLinkError, I am not getting wat the problem is.

public static void main(String[] args) {
  try {
     System.loadLibrary("pfcasyncmt");
  }
  catch(){
  }
}

ERROR- xception in thread "main" java.lang.UnsatisfiedLinkError: no pfcasyncmt in java.library.path

2 Answers 2

4

Java cannot find the dll library. You must set the java.library.path property to point to the dll you want to load, when starting your application.`

java -Djava.library.path="the directory which contains your dll" .........
Sign up to request clarification or add additional context in comments.

2 Comments

Hi, I have set the java.library.path to dll directory. now i got another error. Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jsdk1.4.2_ibm\jre\bin\pfcasyncmt.dll: The specified procedure could not be found at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2144) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2004) at java.lang.Runtime.loadLibrary0(Runtime.java:824) at java.lang.System.loadLibrary(System.java:910) at Test.LatestTestProeVersion1.main(LatestTestProeVersion1.java:30)
That new error message means that the DLL does not contain the native method you are trying to call in with the name, format etc. that Java expects it to be.
0

In windows OS,type command:"path" can get the java.libray.path real path.or System.getProperty("java.library.path"),put the dll in any path of that results.Hope i clear my answer.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.