Jacob:com.jacob.com.ComFailException:无法共同创建对象 [英] Jacob: com.jacob.com.ComFailException: Can't co-create object
问题描述
运行下面的代码时,我遇到异常Exception in thread "main" com.jacob.com.ComFailException: Can't co-create object
.
I am facing exception Exception in thread "main" com.jacob.com.ComFailException: Can't co-create object
while running the code below.
我在线上寻求帮助.一些网站说我需要注册我的dll.我尝试使用regsvr32.exe
注册.但是我无法成功注册.进入弹出式窗口.
I checked online for help. Some sites say that I need to register my dll. I tried registering using regsvr32.exe
. But I am unable to register successfully. Getting below popup.
已加载模块"jacob-1.18-M2-x64.dll",但未找到入口点DllRegisterServer.确保"jacob-1.18-M2-x64.dll"是有效的DLL或OCX文件,并且然后重试.
The module "jacob-1.18-M2-x64.dll" was loaded but the entry-point DllRegisterServer was not found.Make sure that "jacob-1.18-M2-x64.dll" is a valid DLL or OCX file and then try again.
推荐答案
1.)您无需注册jacob-dll,它只需要位于java.library.path上的某个位置即可.是包含必须注册的COM对象的dll.
1.) You don't need to register the jacob-dll, it just has to be somewhere on your java.library.path. It is the dll that contains the COM-object that has to be registered.
2.)如果已注册COM-dll,则必须注意在库中使用正确的JVM. 32位dll仅适用于32位JVM,64位dll仅适用于64位jvm.使用错误的JVM将导致Can't co-create object
错误.
2.) If the COM-dll is registered you have to take care to use the correct JVM with the library. 32-bit-dlls will work only with a 32-bit-JVM, 64-bit-dlls only with a 64-bit-jvm. Using the wrong JVM will result in the Can't co-create object
error.
这篇关于Jacob:com.jacob.com.ComFailException:无法共同创建对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!