JAVA调用C写的类库,当JAVA类没有package的时候调用没有问题,加上package后报错:
Exception in thread "main" java.lang.UnsatisfiedLinkError: ComputeCID
        at com.xunlei.portal.util.InterComm.ComputeCID(Native Method)
        at com.xunlei.portal.util.InterComm.main(InterComm.java:22)代码如下:
package com.xunlei.portal.util;public class InterComm { private static native String ComputeCID(String[] str); static
{
System.load("/usr/yuhongbo/libComputeCID.so");
}
public static void main(String[] args){
String[]   str = new String[] {"dft","sasd"};
System.out.println(InterComm.ComputeCID(str));
}

}如果去掉package com.xunlei.portal.util,那么调用正常。
那位兄弟姐妹知道是怎么回事情呀?