This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes error in ant build : failed to create task or type jjtree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "error in ant build : failed to create task or type jjtree" Watch "error in ant build : failed to create task or type jjtree" New topic
Author

error in ant build : failed to create task or type jjtree

Sankarsan Padhy
Greenhorn

Joined: Aug 01, 2006
Posts: 12
I am running an ant build in my linux pc. I installed ant(a pache Ant version 1.7.1 ). it is giving below error. but the same code is running fine in window pc. what can be the error. how to resolve it?


stacktrace:
Problem: failed to create task or type jjtree
Cause: the class org.apache.tools.ant.taskdefs.optional.javacc.JJTree was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant/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
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

By doing what the error message recommends: add the JAR containing the JJTree class to the lib directory. Apparently you (or someone else) did that on your Windows PC, you need to do the same on Linux.


JBoss In Action
 
 
subject: error in ant build : failed to create task or type jjtree
 
Similar Threads
Please help with wsgen *webservice*
Execute commands at remote machine
A simple question about istrue of Ant.
ANT: Build Fails: [taskdef] Could not load ... net/sf/antcontrib/antlib.xml
Ant ftp task creating problem