2

我已经安装了 apache ant,我想将 SMB 库与我创建的 java/class 一起制作成一个 jar 文件。

我尝试将“ant jar”输入到cmd中。但是,我似乎无法构建它,因为我不断收到此错误。

BUILD FAILED
D:\SMB_JAR_FILES\SMB Java Files\jcifs-master\build.xml:45: The following error o
ccurred while executing this line:
D:\SMB_JAR_FILES\SMB Java Files\jcifs-master\build.xml:34: The Java Servlet API
classes could not be found.  These files can be
    obtained from:

        http://java.sun.com/products/servlet/download.html

Total time: 0 seconds

有人可以教我如何解决这个问题吗?我可以知道我是否遗漏了什么。谢谢你。


在我下载了 Servlet.api 之后

我遇到另一个错误

dependencies:

hasServlet:

compile:
    [javac] D:\SMB_JAR_FILES\SMB Java Files\jcifs-master\build.xml:57: warning:
'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to f
alse for repeatable builds
    [javac] Compiling 178 source files to D:\SMB_JAR_FILES\SMB Java Files\jcifs-
master\build

BUILD FAILED
D:\SMB_JAR_FILES\SMB Java Files\jcifs-master\build.xml:57: Error running \usr\lo
cal\java5\bin\javac compiler

Total time: 0 seconds
4

0 回答 0