My environment is Java 7, on Windows 7 - 64 bit. So here's my requirement and procedures I followed
- I wanted to execute a library called
test.dll
from Java - I first downloaded the latest version of jacob, and put them within a folder, which is included in the Windows environment variable
PATH
. - I registered the
test.dll
usingregsvr32.exe
underC:\Windows\SysWOW64
(it was successful!) - I am running jacob from a webapp, so I made sure that
WEB-INF/lib
hasjacob.jar
in it. - I also set a java System property -
-Djava.library.path=c:/dev/jacob/jacob-1.17-x64.dll
(This is where I have kept thejacob-1.17-x64.dll
)
still I am facing
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)
I have gone through many of the SO posts but none of them have helped me so far
can anyone please guide me to the solution?