Reputation: 19905
I have a large JAR file from a library, the source code of which is scattered across multiple different folders, so I have to merge these folders manually and specify the single merged folder as the source.
Is there any way in Eclipse to link more than one source folder to a specific JAR? I am guessing not and various tricks I have tried do not seem to work, but if anyone knows of one that works, please post it.
Upvotes: 8
Views: 2816
Reputation: 4475
If your source folders are all in the same parent folder, add the parent folder instead.
All subfolders are scanned and attached.
Upvotes: 0
Reputation:
Both of these answers have mis-understood the question. The request was how to add multiple source folders for library jars used by a project - NOT to add multiple source folders for the project itself.
I don't beleive at this time there is a solution for that. There are a couple of bug reports on the Eclipse bug tracker asking for the feature, but for now, we are both stuck with consolidating the source folders manually
Upvotes: 4
Reputation: 3294
On your project, click Properties -> Java Build Path -> Source -> Add Folder...
to add a new source folder.
Upvotes: -1