Results 1 to 3 of 3
  1. #1
    Navaneeth is offline Member
    Join Date
    May 2014
    Rep Power

    Default Build the java project using build.xml in Netbeans or eclipse

    When I try to do Clean and Build project in Netbeans for the project Jsignpdf I get below error. But If I debug the project it runs without error as I have included all the required libraries. I have limited knowledge of java and it is the first project I am trying to build.

    Java Code:
    ant -f "C:\\Documents and Settings\\user\\My Documents\\NetBeansProjects\\jsignpdf-master" clean jar
        Cleaning build
        C:\Documents and Settings\user\My Documents\NetBeansProjects\jsignpdf-master\build.xml:47: The following error occurred while executing this line:
        C:\Documents and Settings\user\My Documents\NetBeansProjects\jsignpdf-itxt\src\build.xml:10: taskdef class net.sourceforge.jarbundler.JarBundler cannot be found
         using the classloader AntClassLoader[]
        BUILD FAILED (total time: 0 seconds)
    As seen in this error message i clicked on the first build.xml link and it was pointing out below portion(target name="clean")

    Java Code:
    <target name="clean">
            <echo message="Cleaning build" />
            <delete dir="${build.dir}"/>
            <delete dir="${dist.dir}"/>
            <delete dir="${output.dir}"/>
            <ant antfile="../jsignpdf-itxt/src/build.xml" useNativeBasedir="true" target="clean" />
    When i clicked on second build.xml link mentioned in error i got below portion of xml highlighted.

    Java Code:
    <taskdef name="jarbundler-2.2.0.jar" classname="net.sourceforge.jarbundler.JarBundler">
    			<pathelement location="${jarbundler-2.2.0.jar}"/>
    So why this error comes? I already have jarbundler-2.2.0.jar in the lib-build folder.(Even in eclipse i got same error. Also you can download the project from this link)

  2. #2
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Rep Power

    Default Re: Build the java project using build.xml in Netbeans or eclipse


    I hope there will be a standard procedure to build the application. Please refer the document if any attached with it.

    You can also raise a request to them about project build if you are not able to find any such document.
    (Living @ Virtual World)

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: Build the java project using build.xml in Netbeans or eclipse

    Looks like its a custom ANT task, so the jar needs to go on the classpath of ANT itself, not the project.

    Perhaps the project comes with its own ANT distribution which should be used to build the project.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. How to start build a project (using netbeans)
    By rothe in forum New To Java
    Replies: 6
    Last Post: 12-13-2013, 05:58 PM
  2. Replies: 2
    Last Post: 08-19-2013, 12:59 PM
  3. Eclipse is build on Java right?
    By flyingeagle in forum New To Java
    Replies: 2
    Last Post: 09-16-2012, 02:30 PM
  4. Replies: 3
    Last Post: 03-16-2012, 10:47 AM
  5. can eclipse use makefile to build the project ?
    By Baseer in forum Advanced Java
    Replies: 1
    Last Post: 03-16-2012, 07:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts