Helpful ways of having one project use the classes/jars of another [message #1495982] |
Tue, 02 December 2014 12:31  |
Eclipse User |
|
|
|
Using eclipse/luna.
Ok, for some reason, this seems much harder for me to figure out in Eclipse than in any of the other java IDE's I've played with over the years since VisualCafe in the 90's. I must be misreading something in the settings.
For this example, let's say I have one project dedicated to making common code usable by multiple projects. Let's call that project "Common", and it consists of two packages:
aaa.bbb.common.one and aaa.bbb.common.two
each with some number of classes each.
I have another project called "Project1", and another called "Project2", both of which use the classes created in project "Common".
1. How do I get the project "Common" to create a jar file such that I can use it in other projects?
2. How do I get Project1 to simply reference the location of the Common project so that all classes created by Common are immediately accessible?
3. Having accomplished #1 above, can I have a single project create two distinct jars (for each of the two packages)?
In a non-IDE evironment (editor + commandline) I would be modifying the classpath and either hand-creating the jars, or using a makefile. But in eclipse, what are the cleanest and simplest ways of doing #1 and #2 above?
Thanks!
[Updated on: Tue, 02 December 2014 12:33] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.92560 seconds