Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere 服务器 - 编程 » 数据库中的 Java

 

安装示例 Java 类

必须先将 Java 类安装到数据库中,然后才能使用它们。可以从 Sybase Central 或 Interactive SQL 安装类。

 ♦ 将类安装到 SQL Anywhere 示例数据库 (Sybase Central)
  1. 启动 Sybase Central 并连接到示例数据库。

  2. 在左窗格中,展开 [外部环境] 文件夹。

  3. 单击 [Java]。

  4. 单击 [文件] » [新建] » [Java 类]。

  5. 单击 [浏览] 浏览到 Invoice.class 的位置。

  6. 单击 [完成]。

 ♦ 将类安装到 SQL Anywhere 示例数据库 (Interactive SQL)
  1. 启动 Interactive SQL 并连接到示例数据库。

  2. 在 Interactive SQL 的 [SQL 语句] 窗格中,键入以下语句:

    INSTALL JAVA NEW 
    FROM FILE 'path\\Invoice.class';

    其中,path 是您已编译的类文件的位置。

  3. 按 F5 键以执行该语句。

该类现在已安装到示例数据库中。

 注意
 另请参见