Results 1 to 3 of 3
Thread: Eclipse Library Management
- 06-04-2012, 11:30 PM #1Member
- Join Date
- Aug 2011
- Rep Power
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.
- 06-05-2012, 07:12 AM #2
- 06-06-2012, 10:56 AM #3Moderator
- Join Date
- Apr 2009
- Rep Power
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.
- By walkswithzombies in forum EclipseReplies: 10Last Post: 02-13-2012, 11:03 AM
- By shivamfet in forum New To JavaReplies: 0Last Post: 12-19-2011, 07:24 AM
- By Vinay Bhatia in forum New To JavaReplies: 5Last Post: 12-24-2010, 01:13 AM
- By jyothi.priyanka in forum New To JavaReplies: 25Last Post: 03-11-2009, 05:11 PM
- By Moncleared in forum Advanced JavaReplies: 0Last Post: 02-20-2009, 04:44 PM