2

I had installed the apache ant and I would like to make the SMB library into a jar file together with the java/class that I had created.

I tried entering the "ant jar" into the cmd. however, I dont seem to be able to build it as I keep getting this error.

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

Could Someone please teach me how to fix this ? May I know if I am missing anything. Thank you.


After I had downloaded the Servlet.api

I encounter another error

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
AuroraBlaze
  • 421
  • 2
  • 8
  • 25
  • As the error message told you. You miss the servlet api. see [here](http://stackoverflow.com/questions/4076601/how-do-i-import-the-javax-servlet-api-in-my-eclipse-project) for more information. – Jens Oct 07 '14 at 07:30
  • Thank you for the link, but according to what I had read it is for Eclipse, but I am using apache-ant... – AuroraBlaze Oct 07 '14 at 07:35
  • So you have to add the jars in the other thread to your classpath using ant. – Jens Oct 07 '14 at 07:37
  • May I know where can I get the jar files and how do I add them in using ant ? This is my first time using ant and I would appreciate it very much if you will kindly guild me through . Thank you – AuroraBlaze Oct 07 '14 at 07:40
  • @Jens I have download the Servlet api jar file and had included it into the ant lib folder. but now when I enter the command "ant jar" i got another type of error instead. Would you please tell me what is wrong with it ? thank you very much =) – AuroraBlaze Oct 07 '14 at 07:54
  • looks like there is a compile error. But i can't see it in the output. – Jens Oct 07 '14 at 08:04

0 Answers0