Using loadjava
The loadjava
utility is an operating system command-line utility that uploads Java
files into the database. The first time you run
loadjava in a schema, it creates a number of
elements for its own use:
- CREATE$JAVA$LOB$TABLE
A table created in each schema, containing Java code elements. Each new class you load using loadjava will generate one row in this table.
- JAVA$CLASS$MD5$TABLE
A
hash table, also referred to as the digest table, used to track the loading of Java elements into a given schema.- LOADLOBS
A package that is installed in each schema, used to load Java code elements as large objects (LOBs) into the database.
Using LOADLOBS, loadjava moves Java files into a
BLOB column in the database table CREATE$JAVA$LOB$TABLE. It also
checks the JAVA$CLASS$MD5$TABLE.MD5 hash value to see if the loaded
classes have been loaded previously and whether they have been
changed (thereby minimizing the need to reload).[45]
This is done to avoid unnecessary invalidation of dependent classes. It then calls the new DDL command CREATE JAVA to load the Java classes from the BLOB column of CREATE$JAVA$LOB$TABLE into the RDBMS as schema objects. This loading occurs only if:
The class is being loaded for the first time
The class has been changed
The -force option is supplied
Figure 22-3 illustrates the loading of Java objects into the Oracle database.

Figure 22-3. Loading Java elements ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access