installjava

Description

Installs a JAR from a client file into an Adaptive Server. The utility is located in $SYBASE/OCS-12_5/bin.

Note In Windows NT, the utility is instjava.exe, located in %SYBASE%\OCS-12_5\bin.

Syntax

installjava
	-f file_name
	[ -new | -update ]
	[ -j jar_name ]
	[ -S server_name ]
	[ -U user_name ]
	[ -P password ]
	[ -D database_name ]
	[ -I interfaces_file ]
	[ -a display_charset ]
	[ -J client_charset ]
	[ -z language ]
	[ -t timeout ]
	[-v]

Or

installjava -v

Parameters

-f file_name

the name of the source file containing the classes to be installed in the database.

-new | -update

specifies whether the classes in the file already exist in the database.

If you specify the new parameter, you cannot install a class with the same name as an existing class.

If you specify the update parameter, you can install a class with the same name as an existing class, and the newly installed class replaces the existing class.

-j jar_name

the name of the JAR containing the classes to be installed in the database. Indicates that the JAR file should be saved in the database and associated with the classes it contains.

-S server_name

the name of the server.

-U user_name

an Adaptive Server login name. If you omit the -U flag and parameter, or if you specify the -U flag with no parameter, Adaptive Server uses the current user’s operating system login name.

-P password

an Adaptive Server password. If you omit the -P flag and parameter, installjava prompts for a password. If you specify the -P flag with no password, the null password is used.

-D database_name

the name of the database in which to install the JAR. If you omit the -D flag, or if you specify the -D flag with no parameter, the user’s default database is used.

-I interfaces_file

the name and location of the interfaces file to search when connecting to Adaptive Server. If you omit the -I flag and parameter, or if you specify the -I flag with no parameter, the interfaces file in the directory designated by your SYBASE environment variable is used.

-a display_charset

allows you to use installjava from a machine where the character set differs that of the server. Use -a in conjunction with -J to specify the character set translation file (.xlt file) required for the conversion. Use -a without -J only if the client character set is the same as the default character set.

-J client_charset

specifies the character set to use on the client. installjava uses a filter to convert input between client_charset and the Adaptive Server character set.

-J client_charset requests that Adaptive Server convert to and from client_charset, the character set used on the client.

-J with no argument disables character set conversion. Use this if the client and server use the same character set.

Omitting -J sets the character set to a default for the platform, which may not necessarily be the character set that the client is using. See the System Administration Guide for more information about character sets and associated flags.

-z language

the name of an alternate language for displaying installjava prompts and messages. Without the -z flag, installjava uses the server’s default language. You can add languages to an Adaptive Server during installation or afterward, using the langinstall utility or the sp_addlanguage stored procedure.

-t timeout

specifies the number of seconds before a SQL command times out. If you do not specify a timeout, the command runs indefinitely. This affects commands issued from within installjava, not the connection time. The default timeout for logging into installjava is 60 seconds.

-v

prints the version number and copyright message for installjava and then exits.

Examples

Example 1

Installs addr.jar and its classes, but does not retain the association between the JAR and classes:

installjava -f '/home/usera/jars/addr.jar' -new

In Windows NT:

instjava -f '\home\usera\jars\addr.jar' -new

Example 2

Reinstalls addr.jar and associates its classes with the employees JAR name:

installjava -f '/home/usera/jars/addr.jar' -update -j employees

In Windows NT:

instjava -f '\home\usera\jars\addr.jar' -update -j employees

Usage


Adding new JARs


Updating JARs and classes

WARNING! If you alter a class used as a column datatype by reinstalling a modified version of the class, you must make sure that the modified class can read and use existing objects (rows) in tables using that class as a datatype. Otherwise, you may be unable to access those objects without reinstalling the class.


Locks

Permissions

You need to be a System Administrator or Database Owner to use installjava.

Tables used

sysjars, sysxtypes

See also

Commandsremove java

System proceduressp_helpjava

Utilitiesextractjava