1

This is my error when building http://www.processing.org/:

BUILD FAILED
/opt/processing/build/build.xml:309: The following error occurred while executing this line:
/opt/processing/build/build.xml:365: The following error occurred while executing this line:
/opt/processing/java/build.xml:37: Problem: failed to create task or type antlr
Cause: the class org.apache.tools.ant.taskdefs.optional.ANTLR was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/opt/apache-ant-1.9.5/lib
        -/root/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem

I have done what it says and placed placed the jar in the right place. i did not see any ant documentation on how to pass the -lib on the commands line i even tried installing antlr via package manager which works i can type antlr and it spits out

Antlr parser generator   Version 1.33MR33   1989-2001

What can I do?

  • "Check that the appropriate optional JAR exists in" or "I have done what it says and placed placed the jar in the right place." proof of this actually being the case? – Rinzwind Oct 21 '15 at 10:25
  • ant-antlr.jar and antlr-4.5.1-complete.jar are both in /opt/apache-ant-1.9.5/lib i swear. – Seth_fox Oct 22 '15 at 7:02
  • Hmm, than we need an other solution. – A.B. Oct 22 '15 at 7:03
  • 1
    when building processing i tacked -lib /opt/apache-ant-1.9.5/lib at the end with and without the jar to no avail, any suggestions? – Seth_fox Oct 22 '15 at 7:34
  • ehm. Not sure but might the jar need execute permissions? :-) – Rinzwind Oct 22 '15 at 7:55
0

Had the same message from gluegen package. Google got http://www.java2s.com/Code/Jar/a/Downloadantoptional1531jar.htm for only the class search. Install ant-optional/ant-optional-1.5.3-1.jar.zip( 608 k) solved this problem ( for the next).

|improve this answer|||||
  • This actually worked for me thank you why is that. I put it in the right folder and ran the build and got a new folder error saying Check that the appropriate optional JAR exists in -/usr/share/ant/lib -/root/.ant/lib so i put it in /usr/share/ant/lib and it worked – Seth_fox Nov 2 '15 at 18:52
  • Hi MiMa, I am trying to build the same package, gluegen. But I have already ant and ant-optional 1.9.7-3 installed.. – elect Feb 5 '17 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.