To make your Java class available within the database, you install the class into the database either from Sybase Central, or using the INSTALL JAVA statement from Interactive SQL or another application. You must know the path and file name of the class you want to install.
Connect to a database as a user with DBA authority.
Open the External Environments folder.
Under this folder, open the Java folder.
Right-click the right pane and click New » Java Class.
Follow the instructions in the wizard.
Connect to the database as a user with DBA authority.
Execute the following statement:
INSTALL JAVA NEW FROM FILE 'path\\ClassName.class'; |
path is the directory where the class file is located, and ClassName.class is the name of the class file.
The double backslash ensures that the backslash is not treated as an escape character.
For example, to install a class in a file named Utility.class, held in the directory c:\source, you would execute the following statement:
INSTALL JAVA NEW FROM FILE 'c:\\source\\Utility.class'; |
If you use a relative path, it must be relative to the current working directory of the database server.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |