troubleshooting Question

How do jacoZoom-generated Java-sources know where the native Library is located?

Avatar of finaris
finarisFlag for Germany asked on
JavaWindows OS
4 Comments2 Solutions2295 ViewsLast Modified:
I generated java wrapper-classes for the DLL of the "Mercury Quality Center 9.0 API" (OTAClient.dll) with JacoZoom.
By default, the wrapped DLL file is located in "c:\program files\common files\Mercury Interactive\Quality Center",
but my application should have the OTAClient.dll file in its own directory (the default path may be not accessible).

I could not find any option in JacoZoom to set the path of the wrapped DLL.
And regarding the generated java-sources, I could not find any information on how the DLL is found by the java classes.
My application only works if the OTAClient.dll file is located in the standard directory, otherwise I get Exceptions that the DLL could not be found.

Does anyone know, how JacoZoom-generated Java-sources know where the native library is located?

I attached a code snippet showing a class generated by JacoZoom.
"vtblCall()" is a method from the jacoZoom library, but it seems to me that this method gets the requested information from the DLL.
As that jacoZoom library is not generated while wrapping the native library, in my opinion, the parameters must be the key to the DLL and its method.
But  I have no idea how.

Can anyone help me?

public class IBugJCW extends implements {
  public static getIBugFromComPtr(int comPtr,boolean bAddRef) throws com.inzoom.comjni.ComJniException { return comPtr == 0 ? null : new IBugJCW(comPtr,bAddRef); }
  public static getIBugFromComPtr(int comPtr) throws com.inzoom.comjni.ComJniException { return comPtr == 0 ? null : new IBugJCW(comPtr); }
  public static getIBugFromUnknown(com.inzoom.comjni.IUnknown unk) throws com.inzoom.comjni.ComJniException { return unk == null ? null : new IBugJCW(unk); }
  public static convertComPtrToIBug(int comPtr,boolean releaseComPtr) throws com.inzoom.comjni.ComJniException { return comPtr == 0 ? null : new IBugJCW(comPtr,true,releaseComPtr); }
  protected IBugJCW(int comPtr,boolean bAddRef)throws com.inzoom.comjni.ComJniException { super(comPtr,bAddRef); }
  protected IBugJCW(int comPtr)throws com.inzoom.comjni.ComJniException { super(comPtr,; }
  protected IBugJCW(int comPtr,com.inzoom.util.Guid guid) throws com.inzoom.comjni.ComJniException { super(comPtr,guid); }
  protected IBugJCW(com.inzoom.comjni.IUnknown unk) throws com.inzoom.comjni.ComJniException{ super(unk,; }
  protected IBugJCW(com.inzoom.comjni.IUnknown unk,com.inzoom.util.Guid guid) throws com.inzoom.comjni.ComJniException { super(unk,guid); }
  protected IBugJCW(int comPtr,boolean useQI,boolean releaseComPtr)throws com.inzoom.comjni.ComJniException { super(comPtr,,releaseComPtr);}
  protected IBugJCW(int comPtr,com.inzoom.util.Guid iid,boolean releaseComPtr)throws com.inzoom.comjni.ComJniException { super(comPtr,iid,releaseComPtr); }
  public java.lang.String getStatus() throws com.inzoom.comjni.ComJniException {
   java.lang.String rv = (java.lang.String)null;
    com.inzoom.comjni.Variant[] _v = new com.inzoom.comjni.Variant[]{
     new com.inzoom.comjni.Variant(rv,com.inzoom.comjni.enums.VarType.BSTR,true)    };
    for(int i = 0; i < _v.length; i++) _v[i].release();
    return rv;
  public void setStatus(java.lang.String pVal) throws com.inzoom.comjni.ComJniException {
    com.inzoom.comjni.Variant[] _v = new com.inzoom.comjni.Variant[]{
     new com.inzoom.comjni.Variant(pVal,com.inzoom.comjni.enums.VarType.BSTR,false)
       for(int i = 0; i < _v.length; i++) _v[i].release();
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros