Standards and
compatibility
Examples
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 '
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
whose value contains a valid class file or jar file.
♦
SQL/92
Vendor extension.
♦
Not supported by Adaptive Server Enterprise.
Sybase
♦
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).
Chapter 9 SQL Statements
/usr/u/libs/jarname.jar
', and relative file names,
Expressions must evaluate to a binary type
557
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers