JACOB调用报错:Can't co-create object? 400 报错
window64位服务器,在myeclipse里调用jacob出错,用的是jacob-1.17-M2-x64.dll
代码:
import com.jacob.com.Dispatch;
public class jacobtest {
public static void main(String[] args) {
// TODO Auto-generated method stub
String result = "";
System.out.println(System.getProperty("java.library.path"));
try {
Dispatch ids = new Dispatch("MailServerCtrl.MailDBInterface");
//Set Winmail database path
Object[] param1 = new Object[]{"E:\\Magic WinMail\\server"};
Dispatch.call(ids, "InitControl", param1);
//Add new mail user
Object[] param2 = new Object[]{"testtest", "jinying.com", "Mail123"};
result = String.valueOf(Dispatch.call(ids, "AddUser", param2));
System.out.println("result: "+result);
ids.safeRelease();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
报错信息:com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstanceNative(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
at weaver.interfaces.winmail.jacobtest.main(jacobtest.java:12)
求教!######
解决了吗
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。