Netbeans: how to export libraries to other projects?

Discussion in 'Java' started by Bart Wakker, Nov 12, 2006.

  1. Bart Wakker

    Bart Wakker Guest


    I'm used to eclipse and want to give netbeans a try. I try to set up
    some projects and am having problems.

    Suppose I have a project A that uses some library X (as defined in the
    library manager).

    Now I create a second project B that depends on A. What I observe is
    that the output of A (its jar file(s)) becomes available to B. But I
    would also expect (like in eclipse project dependancies) that all
    dependancies of A, in this case library X, becomes automatically
    available to B. This seems not to be the case.

    When you have lots of projects with lots of dependancies, it is very
    cumbersome to have to import explicitly every dependancy in each
    project. Is this automatic export/import between dependant projects
    not available in netbeans, or have I missed the way to set it up


    Bart Wakker, Nov 12, 2006
    1. Advertisements

  2. Bart Wakker

    hilz Guest

    How are you adding the dependency? When you go to the project properties
    -> libraries section, how do you add the dependency? Are you using
    "Add JAR/Folder" button?
    Maybe if you use the "Add Project" and add project A as a dependency in
    project B, then that will carry over any libraries that A depends on.

    By the way, you might get better help on the NetBeans mailing lists
    which can be accessed through NNTP (news) via

    Here is the list of available groups:

    check out the "Forums and Newsgroups" section here:
    for how to access it as a newsgroup.
    hilz, Nov 13, 2006
    1. Advertisements

  3. Bart Wakker

    Bart Wakker Guest

    Yes I'm using "add project", and it doesn't carry over any
    dependencies. So even without external libraries, If A imports B and B
    imports C, A does not see C :(. I seem to have to explicitly import C
    into A.

    I'm used from Eclipse that all dependancies are carried over,
    however you can fine tune this quite well: You can select which
    imported libraries are exported to other projects, and even can enter
    filters based on package (positive and negative). It seems eclipse is
    much more advanced in this area.
    Thanks, I'll try the mailing lists.
    Bart Wakker, Nov 13, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.