Netbeans: how to export libraries to other projects?

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

  1. Bart Wakker

    Bart Wakker Guest

    Hello,

    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
    properly?

    TIA,

    Bart
    Bart Wakker, Nov 12, 2006
    #1
    1. Advertising

  2. Bart Wakker

    hilz Guest

    Bart Wakker wrote:
    > Hello,
    >
    > 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
    > properly?
    >
    > TIA,
    >
    > Bart



    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 gmane.org

    Here is the list of available groups:
    http://www.netbeans.org/community/lists/top.html

    check out the "Forums and Newsgroups" section here:
    http://www.netbeans.org/community/lists/
    for how to access it as a newsgroup.
    hilz, Nov 13, 2006
    #2
    1. Advertising

  3. Bart Wakker

    Bart Wakker Guest

    hilz <> writes:

    > 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.


    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.

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


    Thanks, I'll try the mailing lists.
    Bart Wakker, Nov 13, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. Kite
    Replies:
    1
    Views:
    907
    Mark Thornton
    Oct 18, 2003
  2. Mr. Kite
    Replies:
    0
    Views:
    356
    Mr. Kite
    Oct 31, 2003
  3. Pimousse
    Replies:
    2
    Views:
    3,633
    Roedy Green
    Apr 21, 2004
  4. Ilias Lazaridis
    Replies:
    0
    Views:
    910
    Ilias Lazaridis
    Dec 12, 2004
  5. Thomas G. Marshall
    Replies:
    2
    Views:
    826
    Thomas G. Marshall
    Oct 16, 2006
Loading...

Share This Page