The ComLib Class of the com.ms.com package contains routines that are used during Java Component Object Model (COM) integration. All ComLib methods are static; therefore, you can use this class without instantiating it.
public class ComLib { // Methods public native static void declareMessagePumpThread(); public static native void executeOnContext(Object objectWithContext, Runnable runnable); public static native void freeUnusedLibraries(); public static _Guid getGuidOf(Class cl); public static native boolean isEqualUnknown(Object o1, Object o2); public native static int jcdwClassOffsetOf(Class cls, String fieldName); public native static int jcdwClassSizeOf(Class cls); public native static int jcdwOffsetOf(Object jcdw, String fieldName); public native static int jcdwSizeOf(Object jcdw); public native static Object makeProxyRef(Object o); public static boolean ownsCleanup(Object structObj); public static native int ptrRelease(int ptr); public static native Object ptrToStruct(Class structClass, int ptr, boolean fFreeIndirectNativeMemory); public static native Object ptrToUnknown(Class unknownClass, int ptr, boolean isFreeThreaded); public native static void release(Object o); protected static native void setDataWrapperSize( Object DataWrapper, int cb); public native static boolean supportsInterface(Object pComObject, _Guid iid); public static native void startMTAThread(Thread thd); public static native void threadStartMTA(Thread thd); public static native int unknownToPtr(Object obj, _Guid iid); // Fields public static final _Guid IID_IUnknown; public static final _Guid IID_IDispatch; }