Platform SDK: COM |
The Microsoft® Visual J++™ development system for Java provides two tools that you can use to generate type library information for a COM object in Java syntax, the Java Type Library Wizard and the JActiveX command-line tool. Using either of these tools, you can generate Java class files for a COM object.
Note In Visual J++ version 6.0, the JActiveX tool replaces the JavaTLB command-line tool. For more information, see the Visual J++ documentation.
If you are using a Java development environment other than Visual J++, consult that product's documentation for information on COM conversion tools.
Once you have generated the class files for a component, you can add the component classes to your Java application using the import statement. For example, to import the classes stored in the Stream.dll library you use the following code:
import stream.*;
You can then create and use the object's classes in your Java application. For more information about the Java import statement, see a reference on the Java programming language.
The following topics describe issues you should consider when translating a COM object's syntax to Java from C++ or Visual Basic: