Can't co-create object

我们两清 提交于 2019-12-20 02:45:18

问题


i made a dll in .net and call that from java program using jacob.since yesterday i have windows 7 32 bit os so program run successfully.now i formated and install windows 7 64 bit os.so following error encounter:

com.jacob.com.ComFailException: Can't co-create object
    at com.jacob.com.Dispatch.createInstance(Native Method)
    at com.jacob.com.Dispatch.<init>(Dispatch.java)
    at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java)
    at product.Control_product.main(Control_product.java:21)

Register all the dll files but the error is occured.


回答1:


Use a 32bit JVM to execute your code.

The DLL of the COM object you are trying to use needs to be registered. The jacob dll's do not provided they are available in the library path.




回答2:


Error is solved.put the same jacob.dll and jacob.jar in the server \lib folder,jdk bin and lib folder




回答3:


see here http://netheadaches.wordpress.com/2012/04/22/jacob-cant-co-create-object/

You need to register your dll file using the 64bit version of regasm.exe



来源:https://stackoverflow.com/questions/9579976/cant-co-create-object

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!