INSTALL JAR (Register JAR file)

Function

INSTALL JAR registers a JAR file at the HiRDB server. The file is registered in the JAR file storage directory associated with the authorization identifier that is connected.

Format

INSTALL JAR{:embedded-variable|'character-string'}

Operands

Specifies as an absolute or relative path name for the JAR file that is to be registered.

:embedded-variable
Specifies a VARCHAR-type embedded variable that contains the name that is to be registered as its value.
'character-string'
Specifies as a character string literal a name for the JAR file that is to be registered.

Common rules

  1. You must be connected to the HiRDB server to execute INSTALL JAR.
  2. Any error code is returned to SQLCODE.
  3. A JAR file at a different server machine cannot be specified.
  4. Wildcards cannot be used.
  5. If a JAR file with the specified name is already registered, an error results; the existing file is not overwritten.
  6. INSTALL JAR should be executed before any transaction is started.

Example

Register a JAR file named c:\work\sampleproc.jar by setting its name in an embedded variable:

EXEC SQL BEGIN DECLARE SECTION ;
struct {
  short  len ;
  char   str[256] ;
} filename ;
EXEC SQL END DECLARE SECTION ;
EXEC SQL CONNECT ;
strcpy(filename.str,"c:\work\sampleproc.jar") ;
filename.len = strlen(filename.str) ;
EXEC SQL INSTALL JAR :filename ;