Search code examples
javanetbeansincluderdfjena

Add jena library to netbeans


I want to add the Jena library to Netbeans. When I visit http://www.apache.org/dist/jena/ to download Jena library there are two folders: binaries/ and source/. I don't really know whether I should download binary files or source files. In the binary folder there are also so many files some with extension .zip, .tar.gz, .tar.gz.asc etc...

  • Which one do I use?

Secondly, in the online tutorials, they say that only jar files need to be added. In one of the folders I downloaded (apache-jena-2.10.1.zip) jar files are present in lib, lib-src and src-examples.

  • Do I have to go in every folder and individually add it to library?

  • What about the other folders: bat, bin, java-docs? What am I supposed to do with them?

Kindly explain as comprehensively and clearly as possible, as I am new to this field with little knowledge about this stuff.


Solution

  • By the sound of it you want apache-jena-2.10.1.tar.gz or apache-jena-2.10.1.zip, which are different packagings of the same content -- the jena libraries, their dependencies, documentation and command line tools. asc, md5, and sha1 are present so that downloaders can check the integrity of the revelvant download.

    So the zip you have is what you need. For working with jena you only need the jars in lib/. lib-src/ contains the jena source, and may be useful in netbeans if you want to look up the implementation of jena (for example when debugging).

    java-docs/ contains a copy of the jena javadoc: the jena api documentation which is also available online.

    bin/ provides command line tools for unix users. bat/ is the equivalent for windows users.

    In the long run I recommend using netbeans with maven (see this answer for a quick guide). With maven libraries are downloaded as needed, so you don't need to manually locate the jena distribution and extract the libraries.