Figure 22-1. Accessing JSPs from within the Oracle database

Oracle offers a variety of components and commands to work with Java. Table 22-1 summarizes these different elements.

Table 22-1. Oracle components and commands for Java
Component Description
Aurora JVM The Java Virtual Machine (JVM) that Oracle implemented in its database server
loadjava An operating system command-line utility that loads your Java code elements (classes, .jar files, etc.) into the Oracle database
dropjava An operating system command-line utility that drops your Java code elements (classes, .jar files, etc.) from the Oracle database
CREATE JAVADROP JAVAALTER JAVA New DDL statements that perform some of the same tasks as loadjava and dropjava
DBMS_JAVA A built-in package that offers a number of utilities to set options and other aspects of the JVM
JPublisher A utility used to build Java classes around object types and REFs defined in the Oracle database

The remainder of this chapter explains these steps and components. For more thorough coverage of Java in the Oracle database, consult the Oracle documentation. You might also want to look at Java Programming with Oracle JDBC by Donald Bales, and Java Programming with Oracle SQLJ by Jason Price, both from O'Reilly.

22.2 Getting Ready to Use Java in Oracle

Before you can call Java methods from within your PL/SQL programs you will need to do the following:

· Install a Java Development Kit ( JDK™). (Check the Oracle documentation for the latest information about version support.)

· Build your Java classes and code elements, and then compile them into .class and .jar files.

· Set privileges on your Oracle schema.