The Java Type Library Wizard is a tool that reads type libraries from .TLB, .OLB, .OCX, .DLL, and .EXE files and creates Java class files with information about the COM interfaces and methods. These class files are needed for both compiling and running a Java project using COM components.
Return to the top of this article.
To create a Java description of COM components:
After the Java Type Library Wizard is finished, the output window displays a Java import statement. In this sample:
import intrinsc.*;
Typically, you copy this line of text and insert it into the beginning of any Java source file that will use the COM component. This has been done for you in this sample; see line 7 in updatecontrols.java.
Following the import statement, the output window has lines saying that the file SUMMARY.TXT was created. This file lists the interfaces and classes in the Java description of the type library. Use this file to check the types for the parameters and return values in the methods.
You will note that there are no methods listed for any of the classes. Recall when calling COM from Java, you will use the class file to create the COM component, but you must use the interface file to access the COM component.
Double-click the SUMMARY.TXT line to view that file in Developer Studio.
Return to the top of this article.