Original Post
I am new to Eclipse and would like to set up a specific directory structure for my packages.
For example, for my project MyProj (which uses the default MyProj/src and MyProj/bin for I/O), I want the following structure:
com.myproj.core
com.myproj.core.utils
com.myproj.core.widget
com.myproj.testing
com.myproj.xml
So the 'core' package needs to have two "nested" packages named utils and widget. So I right-click my core package in Package Explorer, go to New >> Package. The dialog that pops up (New Java Package) has 2 textfields and a Browse button. One text field is for defining the Source Folder that the package will live in, the other field is for naming the package.
The default values for the Source Folder are MyProj/src, and the default name is already populated as "core". When I try to Browse for another package, it doesn't see anything below MyProj/src, and when I try to manually type in MyProj/src/core it gives me an error of Source folder is not on the build path.
I have double-checked to make sure that the core package is properly set up to be a top-level package in the src folder.
When I right-click MyProj and go to Build Path >> Configure Build Path, it won't let me add core to the build path, giving me an error of Cannot nest 'MyProj/src/core' ins... exclude 'core/' from MyProj/src
What is going on here? I just want to add utils and widget to core!?!?
For example, for my project MyProj (which uses the default MyProj/src and MyProj/bin for I/O), I want the following structure:
com.myproj.core
com.myproj.core.utils
com.myproj.core.widget
com.myproj.testing
com.myproj.xml
So the 'core' package needs to have two "nested" packages named utils and widget. So I right-click my core package in Package Explorer, go to New >> Package. The dialog that pops up (New Java Package) has 2 textfields and a Browse button. One text field is for defining the Source Folder that the package will live in, the other field is for naming the package.
The default values for the Source Folder are MyProj/src, and the default name is already populated as "core". When I try to Browse for another package, it doesn't see anything below MyProj/src, and when I try to manually type in MyProj/src/core it gives me an error of Source folder is not on the build path.
I have double-checked to make sure that the core package is properly set up to be a top-level package in the src folder.
When I right-click MyProj and go to Build Path >> Configure Build Path, it won't let me add core to the build path, giving me an error of Cannot nest 'MyProj/src/core' ins... exclude 'core/' from MyProj/src
What is going on here? I just want to add utils and widget to core!?!?