Compiling the Source Code | Java External Stored Procedures | Vantage - Compiling the Source Code - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

To compile the source code for your Java routine, you need javFnc.jar, the Teradata Java external stored procedure and UDF runtime library.

IF you compile the source code on ... THEN ...
your client system download the runtime library from Teradata Downloads.
the database system the runtime library is already available.

Add the path to the runtime library to your class path (or use the -classpath option of the Java compiler). For details on the location of the runtime library on a database system, see Class Path.

For example, suppose you downloaded javFnc.jar to C:\java_xsp on your Windows client. You can compile the source code in region.java as follows:

javac -classpath C:\java_xsp\javFnc.jar region.java

The version of the class file that you generate when you compile the Java source code must be compatible with the JRE on the database system.

For example, suppose the database uses JRE 1.8 and your client system uses JDK 8.0. To compile the source code in region.java on your client system, you can use the -target option of the Java compiler.

javac -target 1.8 -classpath C:\java_xsp\javFnc.jar region.java

To determine the version of the JRE on the database system, use the cufconfig utility to see where the JRE was installed. For more information, see Teradata Vantage™ - Database Utilities, B035-1102.