Results 1 to 3 of 3
  1. #1
    bryceray1121 is offline Member
    Join Date
    Aug 2011
    Rep Power

    Default Eclipse Library Management


    I am a relatively new java developer trying to learn eclipse ide. I am working on a application that I have divided into 4 eclipse projects.

    Project 1 - Base Application
    ------main for all projects
    ----all required jars

    Project 2 - Extends Project 1

    Project 3- Extends Project 1

    Project 4 - Extends Project 1

    My main problem has to do with how to best organize my application, specifically:
    -In eclipse how do I prevent circular references. I have it set so 1 depends on 2,3,4 and so 2 depends on 1, 3 depends on 1, and 4 depends on 1. I have turned off errors for circular reference but i think I am not understanding something correctly.
    -If Project 2 is extending a member variable in project 1 it doesn't seem to know the type. For example, project 1 has a logger member variable declared protected and of type org.slf4j.Logger. Project 1 can reference this type because I have imported the correct slf4j jar. However, if project 2 tries to use this member variable through inheritance it gets a unknown type error. Do I really have to import the jar to both projects? Or is there a way to get project 2 to see the slf4j jar library in the base project (project 1).

    Thanks for your help.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Eclipse Library Management

    Quote Originally Posted by bryceray1121 View Post
    I am a relatively new java developer trying to learn eclipse ide.
    Moved from New to Java.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Eclipse Library Management

    Each project is a distinct thing.
    A project produces (in this case) a single jar file, which does not include any dependencies.
    Any project that uses that jar file will need to include those dependencies itself, otherwise any bits of the jar that it uses that uses one of those dependencies will not run.

    As for your general structure, I'm not entirely sure I understand it. You seem to be implying that project 1 requires the others to work? And those themselves require project 1.
    To me that says that these shouldn't have been split in the first place.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. eclipse and user made library
    By walkswithzombies in forum Eclipse
    Replies: 10
    Last Post: 02-13-2012, 12:03 PM
  2. setting java.library.path through eclipse and maven
    By shivamfet in forum New To Java
    Replies: 0
    Last Post: 12-19-2011, 08:24 AM
  3. wanna make Library Management project
    By Vinay Bhatia in forum New To Java
    Replies: 5
    Last Post: 12-24-2010, 02:13 AM
  4. library management
    By jyothi.priyanka in forum New To Java
    Replies: 25
    Last Post: 03-11-2009, 06:11 PM
  5. Eclipse And Project Management
    By Moncleared in forum Advanced Java
    Replies: 0
    Last Post: 02-20-2009, 05:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts