java无法使用JACOB创建ActiveXComponent
自从迁移到Lync 2013,我的代码在
ActiveXComponent officeCommunicatorActiveX = new ActiveXComponent("Communicator.UIAutomation");
除此之外:
Exception in thread "Thread-10" 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:101)
我尝试了一些在线解决方案,但都不管用。 Lync以32位模式运行,我用bot 32&;64位JDK——无关紧要。 我用雅各布错了吗
编辑: 在运行此代码之前,我使用以下选项选择JACOB dll:
if (shouldLoad32Bit()) {
System.setProperty(LibraryLoader.JACOB_DLL_PATH, Files.JACOB_32.getAbsolutePath());
} else {
System.setProperty(LibraryLoader.JACOB_DLL_PATH, Files.JACOB_64.getAbsolutePath());
}
# 1 楼答案
对该API的支持在Lync 2013年停止
http://social.msdn.microsoft.com/Forums/lync/en-US/222958e2-24f9-46bf-b79a-eb88a3feac72/lync-2013-client-ocs-2007-automation-api-compatibility?forum=communicatorsdk