0
public static void main(String[] args) throws
FailingHttpStatusCodeException, MalformedURLException,IOException,
InterruptedException {

    final ActiveXComponent activeXComponent = new ActiveXComponent("CLSID:0CA54D3F-CEAE-48AF-9A2B-31909CB9515D");

    WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER);
    webClient.getOptions().setThrowExceptionOnScriptError(false);
    webClient.getOptions().setActiveXNative(true);
    // https://pbsz.ebank.cmbchina.com/CmbBank_GenShell/UI/GenShellPC/Login/Login.aspx
    HtmlPage page = webClient.getPage("https://pbsz.ebank.cmbchina.com/CmbBank_GenShell/UI/GenShellPC/Login/LoginOLD.aspx");
    System.out.println(page.asXml()); }

enter image description here

Exception in thread "main" com.jacob.com.ComFailException: Can't find moniker

I passed C:\Windows\System32\CMBEdit.dll Still not feasible

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56

1 Answers1

0

Update:

This is Jacob question, since the exception is:

Exception in thread "main" com.jacob.com.ComFailException: Can't find moniker
    at com.jacob.com.Dispatch.createInstanceNative(Native Method)
    at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
    at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58)
    at test.test.JacobTest.main(JacobTest.java:24)

As hinted in another answer:

COM objects have to be registered to be found. It does not matter in which folder they reside.

Call

regsvr32 mycomdll.dll

on the dll.

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56