-3

I ma trying to run the java project jsignpdf and after importing the project i added some libraries which are required.

Now when running the project I get error like

taskdef class net.sourceforge.jarbundler.JarBundler cannot be found
 using the classloader AntClassLoader[]
BUILD FAILED (total time: 0 seconds)

In my build.xml i have following related to it:

<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler">
        <classpath>
            <pathelement location="${jarbundler.jar}"/>
        </classpath>
</taskdef>

So how this can be solved?

IT researcher
  • 3,274
  • 17
  • 79
  • 143

1 Answers1

1

Apparrently you also need to have some of the Apache Commons libraries in your classpath. The project you linked to seems already prepared for the Eclipse IDE - you will probably have to add the missing JAR library files in Netbeans manually as mentioned e.g. here and here.

To be honest, however, maintaining any number of external JAR dependencies manually becomes extremely frustrating very quickly. You would be better off in the long run if you invested some time in one of the mainstream build and/or dependency management systems such as Maven, Ivy or Gradle. Such a system would take care of downloading the dependencies and setting up the classpath for you, without all the painful probing and poking...

Community
  • 1
  • 1
thkala
  • 84,049
  • 23
  • 157
  • 201
  • ok. i added so many libraries which are required. still com.sun.pdfview is shown missing even though i add it from here http://www.java2s.com/Code/Jar/p/Downloadpdfrendererjar.htm – IT researcher May 22 '14 at 11:03
  • @ITresearcher: Perhaps you should try using the JAR files from the current project page: https://java.net/projects/pdf-renderer/downloads – thkala May 22 '14 at 12:04
  • Ok.now i have resolved all errors.But when i run the project i am getting error like "Target "run" does not exist in the project "JSignPdf". " What does it mean? – IT researcher May 22 '14 at 12:42
  • @ITresearcher: I assume that you need to create a `run` target using an appropriate class that contains a `main()` method. I have not really used NB, however, so I cannot help with that. You could try asking another question, if a Google search reveals nothing, which is rather unlikely... – thkala May 22 '14 at 13:07