Oracle8i SQLJ Developer's Guide and Reference
Release 8.1.5

A64684-01

Library

Product

Contents

Index

Prev  Chap Top Next

Dropping Java Schema Objects

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 only.

The 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 .sqlj, .java, .class, .ser, and .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 .jar, .zip, .class, .java, or .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.


Note:

It is generally advisable to remove Java schema objects in the same way that you first load them. If you load a .sqlj source file and translate it in the server, then run dropjava on the same source file. If you translate on a client and load classes and resources directly, then run dropjava on the same classes and resources.  


For example, if you run loadjava on Foo.sqlj, then execute dropjava on the same file, as follows:

dropjava -user scott/tiger Foo.sqlj

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:

dropjava -user scott/tiger Foo.jar

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):

dropjava -user scott/tiger Foo*.class dir1/dir2/Foo_SJProfile*.ser

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.




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index