当我尝试运行我的代码时,我得到了
public class Main {
public interface RnowUtilUnitTest extends Library {
RnowUtilUnitTest INSTANCE = (RnowUtilUnitTest) Native.loadLibrary("D://RightNowCRMHelper.dll",
RnowUtilUnitTest.class);
void Test_GetValueFornamedID();
}
public static void main(String[] args) {
RnowUtilUnitTest sdll = RnowUtilUnitTest.INSTANCE;
sdll.Test_GetValueFornamedID();
//sdll.Test_ExecuteQuery();
}
}
我收到以下错误 线程" main"中的例外情况java.lang.UnsatisfiedLinkError:查找函数时出错' Test_GetValueFornamedID':找不到指定的过程。
at com.sun.jna.Function.<init>(Function.java:179)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:344)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:324)
at com.sun.jna.Library$Handler.invoke(Library.java:203)
at com.sun.proxy.$Proxy0.Test_GetValueFornamedID(Unknown Source)
at test.Main.main(Main.java:34)
这是我的点网代码
[TestMethod]
61 public void Test_GetValueFornamedID()
62 {
63 objRnowUtil = new RnowUtil("Test");
64
65 //Invoke the GetValuesForNamedID operation, supplying the appropriate string value
66 NamedID[] valuesForNamedID = objRnowUtil.GetValueFornamedID(null, "Incident.CustomFields.c.query_status");
67
68 Assert.IsNotNull(valuesForNamedID);
69 Assert.IsTrue(valuesForNamedID.Length > 0);
70 foreach (NamedID namedID in valuesForNamedID)
71 {
72 if (namedID.Name.ToLower() == "Repeat Call".ToLower())
73 {
74 Assert.AreEqual(2383, namedID.ID.id);
75 }
76
77
78 }
79
80 }
81