Hello,

I'm writing a plugin for a software in eclipse. I'm using vtd-xml.jar for importing an xml file. I have added to the build path by rigt clicking on the paroject and selecting the opetion add to build path. While I do the operations from eclipse it is working fine but when I make a jar file and install it in the software then I'm getting an exception with vtd-xml.jar as class not found. Is there something that I have to do while making a jar file when installed in main software?

To use that jar from an ordinary Java application (ie not in Eclipse) you should place a copy of it somewhere in the system classpath

thanks a lot, can you please explain a bit more for me so that I can work it out?

this would be very helpful

I'm posting from my phone and the details are a little iffy but ...

If you right-click on your project folder
Properties
Java build-Path
The 2nd tab .. There should be options to add internal and external .jar files.

yes I did that, that's how I make it work in my eclipse but unable to make it work when I make a jar and install it in the main software

The system classpath variables contains a list of places where Java will look to find classes. The jar should be in a folder referred to in the classpath so Java can find it. See http://download.java.net/jdk7u6/docs/technotes/tools/solaris/classpath.html for more info on classpath - that link's specific to solaris, but the same principle applies to Windows. You can Google for more examples and tutorials

thanka lot. I will look at it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.