|Oracle8i SQLJ Developer's Guide and Reference
To complement the
loadjava utility, Oracle provides the
dropjava utility to remove (drop) Java source, class, and resource schema objects. It is recommended that any schema object loaded into the server using
loadjava be removed using
dropjava utility transforms command-line file names and
.jar file contents to schema object names, then removes the schema objects from the database. You can enter
.jar files on the command line in any order.
Alternatively, you can specify a schema object name (full name, not short name) directly to
dropjava. A command-line argument that does not end in
.sqlj is presumed to be a schema object name. If you specify a schema object name that applies to multiple schema objects (such as a source schema object
Foo and a class schema object
Foo), all will be removed.
Dropping a class invalidates classes that depend on it, recursively cascading upwards. Dropping a source drops classes and resources that were generated from it.
It is generally advisable to remove Java schema objects in the same way that you first load them. If you load a
For example, if you run
Foo.sqlj, then execute
dropjava on the same file, as follows:
If you translate your program on the client and load it using a
.jar file containing the generated components, then use the same
.jar file to remove the program:
If you translate your program on the client and load the generated components using the
loadjava command line, then remove them using the
dropjava command line, as follows (presume there were no iterator classes):
Care must be taken if you are removing a resource that was loaded directly into the server. (This includes profiles if you translated on the client without using the
-ser2class option.) When dropping source or class schema objects, or resource schema objects that were generated by the server-side SQLJ translator, the schema objects will be found according to the package specification in the applicable
.sqlj source file. However, the fully qualified schema object name of a resource that was generated on the client and loaded directly into the server depends on path information in the
.jar file or on the command line at the time you loaded it. If you use a
.jar file to load resources and use the same
.jar file to remove resources, there will be no problem. If, however, you use the command line to load resources, then you must be careful to specify the same path information when you run
dropjava to remove the resources. (See "Naming of Class and Resource Schema Objects" for information about how resource schema objects are named when loaded directly into the server.)
For more information about
dropjava, see the Oracle8i Enterprise JavaBeans and CORBA Developer's Guide.