Send the class definition to the database server

After you have created the JAR file, use the UDTManager.createUDT() method to create the opaque type by sending the class definition to the database server:
public void createUDT(UDTMetaData mdata, String jarfile, String 
   classname, int deploy) throws SQLException;

The jarfile parameter is the path name of a JAR (.jar) file that contains the class definition for the opaque type. By default, the classes in the java.io package resolve relative path names against the current user directory as named by the system property user.dir; it is typically the directory in which the Java™ Virtual Machine was invoked. The file name must be included in your CLASSPATH setting if you use an absolute path name.

The classname parameter is the name of the class that implements the opaque type.

The SQL name of the opaque type defaults to the class name if your application does not call setClassName(). You can specify an SQL name by calling the UDTMetaData.setSQLName() method.
Important: If your application calls createUDT() within a transaction or your database is ANSI or enables logging, some extra guidelines apply. For more information, see Execute in a transaction.