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

stacker
  • 68,052
  • 28
  • 140
  • 210

2 Answers2

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" .........
Petar Minchev
  • 46,889
  • 11
  • 103
  • 119
  • 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) –  May 10 '10 at 07:05
  • 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. – Jesper May 10 '10 at 13:27
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.

Mr Lou
  • 1,757
  • 19
  • 19