The loadjava utility (Oracle 8.1.5 and up) loads Java source and class
files into the database. When class files are created in a conventional
manner, outside the database, loadjava is used to get them into the
database.

loadjava requires two database privileges to load java objects into your
own schema: CREATE PROCEDURE and CREATE TABLE. To load Java objects into a
schema other than the currently connected user, CREATE ANY PROCEDURE and
CREATE ANY TABLE privileges are required.

This example will use a simple Java program that will be compiled outside
of Oracle and then loaded into the database.

In this example, the Java class file was loaded into the database. The
Java source file can also be loaded. But, both the source and class files
cannot be loaded at the same time.

C:\oracle9i\bin>loadjava -user scott/tiger SimpleJava.java

If loading many Java class files at one time, it is advisable to put them
in a JAR file and load them into the database at one time, since the
loadjava program will also load JAR files. A JAR file is a group of Java
class files lumped into one file, a format similar to TAR (on UNIX ) and
WinZip (on Windows). The contents of a JAR file can be viewed using these
popular utilities. Java developers prefer to distribute a few JAR files
rather than many individual Java class files.

loadjava provides many command line options for the Java developer. The
complete list can be viewed by typing loadjava at the command line.

Just as loadjava loads the database with our Java files or classes, the
dropjava utility deletes them. In the example below, the class file that
was loaded with loadjava is removed. And just like loadjava, it will drop
Java source, Java classes, or JAR files.

C:\oracle9i\bin>dropjava -u scott/tiger SimpleJava.class

Alternatively, instead of using the command line utility, you can call a
package that will do the same thing:

SQL> call dbms_java.dropjava('... options...');

Dropjava can be used to delete Java objects from the database. These Java
objects may have been loaded into the database through the loadjava
utility. The next utility also loads code into the database; only instead
of Java, it loads a PL/SQL Server Page (PSP).