EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 575

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9 SQL Statements
557
The jar-name is a character string value, of up to 255 bytes long. The jar-
name is used to identify the retained jar in subsequent INSTALL UPDATE
and REMOVE statements.
FROM FILE clause Specifies the location of the Java class(es) to be
installed.
The formats supported for file-name include fully qualified file names, such
as ’
c:\libs\jarname.jar’
and ’
/usr/u/libs/jarname.jar
, and relative file names,
which are relative to the current working directory of the database server.
The filename must identify either a class file, or a jar file.
FROM expression clause Expressions must evaluate to a binary type
whose value contains a valid class file or jar file.
SQL/92 Vendor extension.
Sybase Not supported by Adaptive Server Enterprise.
The following statement installs the user-created Java class named
Demo, by providing the filename and location of the class.
INSTALL JAVA NEW
FROM FILE ’D:\JavaClass\Demo.class’
After installation, the class is referenced using its name. Its original file
path location is no longer used. For example, the following statement
uses the class installed in the previous statement.
CREATE VARIABLE d Demo
If the Demo class was a member of the package sybase.work, the fully
qualified name of the class must be used, for example:
CREATE VARIABLE d sybase.work.Demo
The following statement installs all the classes contained in a zip file,
and associates them within the database with a JAR file name.
INSTALL JAVA
JAR ’Widgets’
FROM FILE ’C:\Jars\Widget.zip’
Again, the location of the zip file is not retained and classes must be
referenced using the fully qualified class name (package name and class
name).
Standards and
compatibility
Examples

Table of Contents

Related product manuals