Bug 301924 - Nested folders in classpath not supported
Summary: Nested folders in classpath not supported
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-05 02:57 EST by Sampo Niskanen CLA
Modified: 2022-09-26 08:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sampo Niskanen CLA 2010-02-05 02:57:21 EST
Build Identifier: 20090920-1017

Eclipse explicitly forbids adding nested folders as class folders to the classpath in the project properties.  While this may be considered wrong for actual class folders, it is often necessary for resource directories (which need to be added as class folders).  Java itself has no problem on adding nested folders to the classpath, so Eclipse should not restrict this either.

This issue has been reported earlier as bug #25933, which has been marked fixed in 2002.

My specific case that Eclipse prohibits is having configuration files in

config/
config/aa/
config/bb/

which all must be in the classpath for the application/unit tests to function.  Adding them to the classpath is impossible due to the restriction.  (I'm not the only one needing this:  http://www.eclipsezone.com/eclipse/forums/t71912.html from 2006.)

Using source folders instead of class folders is not a suitable alternative since it 1) presents all the folders on the main level of the Package/Project Explorer, 2) hides the folders from the actual directory hierarchy, and 3) they are not source code folders.

I've tested adding the nested class folders manually to .classpath, and it works correctly, except that Eclipse complains all the time that the project configuration is broken.  When running and ignoring the error it functions correctly.  Therefore only the validation needs to be removed and the UI changed to allow nested class paths (or alternatively an inclusion/exclusion similar to the source folders should be implemented).


Reproducible: Always

Steps to Reproduce:
1. Edit project preferences
2. Attempt to add nested folders to the classpath as class folders
3. Profit - NOT
Comment 1 Eclipse Genie CLA 2020-07-04 17:13:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-09-26 08:30:35 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.