java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jdk1.5.0_05\bin\netSock.dll: ??????ó??ò???ò????????ó??òδ???????????°????ó??ò????~??????????
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at com.aaa.netSock.NetSock.<clinit>(NetSock.java:6)
Exception in thread "main" 

解决方案 »

  1.   

    很明显 UnsatisfiedLinkError 就是找不到,没法Load Lib要确定文件物理存在,而且有权限访问。
    也许由于文件夹存在空格什么的莫名其妙的原因也不一定。将dll换个浅路径试试看,或者换个dll试试看
      

  2.   

    dll肯定没问题,在别的机器上都可以。
      

  3.   

    应该是路径上有空格导致的吧。在windows平台上,java总是尝试查找当前路径,所以,你可以考虑将
    dll放到你的启动目录下。
    参考信息:
    Here are all the reasons I've documented for unsatisfied linking errors...The code to load a native library is System.loadLibrary("name"). Unsatisfied linker errors can be due to a number of reasons. The most common is an incorrect naming of the native library for the name passed to the loadLibrary function. The text passed to the loadLibrary function must not include the extension name in the text, that is .dll or .so. The text must be 'name' and not 'libname' for all platforms. On Windows the native library must then be called name.dll and on Unix it must be called libname.so. If you are debugging using java -debug, then the native library must be called name_g.dll on Windows and libname_g.so on Unix.Another common reason for the native library not loading is because it is not in your path. On Unix make sure that your LD_LIBRARY_PATH contains the path to the native library. On Windows make sure the PATH environment variable contains the path to the native library. Note that on Unix systems LD_LIBRARY_PATH must be set to '.' if the native library is in the current directory. This is unlike Windows which always looks in the current directory.The native library will also not load if there are any unresolved symbols in the compiled C/C++ code. Unresolved symbols will be described if you use the -verbose:jni commandline switch when running java.Ensure that you are using the correct C/C++ compiler and linker combination and options for successful native library loading. If your native library has to link with another shared objects (DLL), it will not necessarily link successfully if it was generated from another compiler or even an older version of the same compiler. 
      

  4.   

    UnsatisfiedLinkError是由于系统找不到JNI所需的某个DLL文件,可以将所有DLL放在系统path能找到的地方
    建议把 dll 放到C:\WINDOWS\system32下