A JAR (Java ARchive) file is a collection of Java classes in a zip file format. The classes (byte compiled Java) are referenced when an external Java routine is created using the EXTERNAL NAME clause of CREATE PROCEDURE (External Form).
JAR files are always created outside of the database. Before you can reference a class, you must register it and copy it into the SQL environment. Once a JAR has been installed in the database, you cannot change its content in any way. You are restricted to either deleting a JAR file or replacing it in its entirety.
JAR files are available only to the user who installs them by means of a call to the SQLJ.Install_Jar external procedure (see SQLJ Database and Teradata Vantage™ - SQL External Routine Programming, B035-1147 for information about this procedure). Analogous to the infrastructure for C and C++ external routines, the system creates a directory on the platform for each database that contains a JAR. Analogous to the fact that C and C++ DLLs created for 1 or more external routines in a given database cannot be accessed by other users or databases, so JAR files created for a Java external routine cannot be accessed by other users or databases.
There are no specific privileges for JAR files. Therefore, user or database A cannot create an external procedure that references a JAR installed in user or database B. However, user or database A can be granted access to a Java external procedure that has been created in user or database B by using the same privileges as are used for C and C++ external routines. See GRANT (SQL Form) in Teradata Vantage™ - SQL Data Control Language, B035-1149 for information on how to do this.
One way to ensure such ready access to Java external procedures is to install all JAR files and create all Java external procedures in the same database and then grant access to them for all users who must execute them.
See Teradata Vantage™ - SQL External Routine Programming, B035-1147 for details.