user2140206 user2140206 - 2 months ago 10
Java Question

How to use a custom OLE dll in a java eclipse plugin?

I'm trying to use a custom OLE dll with a control in my Eclipse RCP Plugin.

The dll is in my working directory, but if I try to use it I get a SWTException:

I use this code:

Display display = Display.getCurrent();
Shell shell = new Shell(display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
OleClientSite site = new OleClientSite(frame, SWT.NONE, "MyCustomDll.TestControl");
OleAutomation test = new OleAutomation(site);;

And get this Exception:

org.eclipse.swt.SWTException: Class ID not found in registry
at org.eclipse.swt.ole.win32.OLE.error(
at org.eclipse.swt.ole.win32.OLE.error(
at org.eclipse.swt.ole.win32.OleClientSite.<init>(

How can I tell my plugin where to look for the Class ID?
There must be some basic point I'm missing but I didn't find anything about using custom OLE dlls.


After a lot of try and error I found the solution for my Problem:

My Dll was registered with:


Instead I registered it with:


and it worked. I don't know why there are different versions anyway.