If the target Java class and interface can be used, generate adapter class source. Use the java2cob command to generate adapter classes. The java2cob command reads the class file (extension .class) of the Java class/interface and generates the corresponding adapter class source.
The java2cob command generates adapter classes of not only the class specified by the option but also every other class/interface required to use the class.
An example of generating adapter class source from the java.util.Date class is shown below.
d:\home\j2cob\samples>java2cob java.util.Date java/lang/Object java/io/Serializable java/lang/Cloneable java/lang/Comparable java/util/Date java/lang/reflect/GenericDeclaration java/lang/reflect/Type java/lang/reflect/AnnotatedElement java/lang/Class java/lang/Throwable java/lang/Exception java/lang/InterruptedException java/lang/CharSequence java/lang/String java/lang/reflect/TypeVariable java/lang/annotation/Annotation java/lang/ClassLoader java/lang/ClassNotFoundException java/lang/InstantiationException
Note
The class file referenced by the class/interface may not always be available, depending on the execution environment. For information on how to generate adapter classes when the class file is not available, see "3.1.4 Generating an Adapter Class When the Class File is Not Available".