1

如何用ant编译SQLJ?

4

2 回答 2

1

我认为没有原生的 sqlj Ant 任务。exec您可以使用 Ant任务启动 sqlj 进程,就好像您从命令提示符执行它一样。

编辑:sqlj下载链接:http ://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

于 2009-10-09T23:19:40.460 回答
1

我还没有看到使用 Ant 编译 SQLj 源代码的适当任务,但是有一个旧的 ant-user 帖子,其中有人提交了 ant 任务的源代码。
我不知道它的效果如何,但它至少应该指出它是如何完成的。

来自 Javadoc:

* Task to compile SQLj source files. This task can take the following
* arguments:
* <ul>
* <li>srcdir
* <li>destdir
* <li>compile
* <li>ser2class
* <li>user
* <li>url
* </ul>
* Of these arguments, the <b>srcdir</b> and <b>destdir</b> are required.
* <p>
* When this task executes, it will recursively scan the srcdir and dest
* destdir looking for sqlj files to compile. This task make its compile
* decision based on timestamp. Notice that the generated java files will
* be located at the same directory as the sqlj files, Only the binary files
* will be placed at the destdir directory.
于 2009-10-10T09:10:41.550 回答