Java routines

Java™ routines are external routines that have a Java programming language implementation.

Java routines are created in a database by executing a CREATE PROCEDURE or CREATE FUNCTION statement. This statement must indicate that the routine is implemented in Java with the LANGUAGE JAVA clause. It must also specify with the EXTERNAL clause, the Java class that implements it.

External procedures, functions, and methods can be created in Java.

Java routines can execute SQL statements.

The following terms are important in the context of Java routines:
CREATE statement
The SQL language CREATE statement used to create the routine in the database.
Routine-body source code
The source code file containing the Java routine implementation. The Java routine can access the database using either JDBC or SQLJ application programming interfaces.
JDBC
Application programming interface that provides support for dynamic SQL statement execution in Java code.
SQLJ
Application programming interface that provides support for static SQL statement execution in Java code.
SDK for Java
Software development kit for Java provided and required for Java source code compilation.
Routine class
A Java source code file containing the compiled form of Java routine source code. Java class files can exist on their own or they can be one of a collection of Java class files within a JAR file.