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

SAP Sybase SQL Anywhere 16.0 (中文) » SQL Anywhere 服务器 - 编程 » 数据库中的 Java » 数据库中 Java 类的特殊功能

 

如何调用 main 方法

通常都是通过对具有 main 方法的类运行 Java VM 来启动 Java 应用程序(在数据库外部)。

例如,文件 %SQLANYSAMP16%\SQLAnywhere\JavaInvoice\Invoice.java 中的 Invoice 类具有一个 main 方法。当使用如下所示的命令从命令行执行该类时,执行的是 main 方法。

java Invoice
 从 SQL 调用类的 main 方法
 另请参见