开发者

How do I add multiple source folders to a JAR?

开发者 https://www.devze.com 2023-03-17 05:41 出处:网络
I have a large JAR file from a library, the source code of which is scattered a开发者_运维技巧cross multiple different folders, so I have to merge these folders manually and specify the single merged

I have a large JAR file from a library, the source code of which is scattered a开发者_运维技巧cross 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.


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


If your source folders are all in the same parent folder, add the parent folder instead.

All subfolders are scanned and attached.


On your project, click Properties -> Java Build Path -> Source -> Add Folder... to add a new source folder.

0

精彩评论

暂无评论...
验证码 换一张
取 消