A source folder is marked by Eclipse as containing java sources. Then, when you compile your project Eclipse will look for your source code into all your source folders. You can make any folder become a source folder adding it to the java build path.
Absolutely possible....create a process having main method to do all these things... Inside this specify the eclipse's workspace as fiel path to create the folders. Assk the user for a package name. Now take this input and append to the fiel path to create a package.
You can link to a folder by using the Advanced option on the New->Folder dialog or drag/drop the folder from a file system navigator (Explorer,Nautilus, etc) onto your project in Eclipse. You will get an option to copy the folder or link to it in the file system.
I have several somewhat separate programs, that conceptually can fit into a single project. However, I'm having trouble telling Eclipse to make several folders inside a project folder.
A simple form of the structure would be:
/UberProject
/UberProject/ProgramA/
/UberProject/ProgramA/com/pkg/NiftyReader.java
/UberProject/ProgramB/
/UberProject/ProgramB/com/pkg/NiftyWriter.java
That is, ProgramA
and ProgramB
are both projects (in fact, they're currently existing Java projects), which conceptually fit into UberProject
.
I don't think I'm supposed to make UberProject
be a Java project; it's not a classpath, for instance. ProgramA
and ProgramB
do seem like they should be Java projects (they might use different build dependencies as well), but I see no way in Eclipse 3.3 to create two folders under UberProject
that are intended to contain Java code. I thought about adding a .project file to each of the two sub-projects, but I'm not sure that's appropriate, either. Eclipse help isn't being helpful, and I didn't see anything on SO about this specific problem.
Just to be clear: assume as given the necessity of the existence of UberProject
. UberProject
can be a Java project, or not; it doesn't matter. (Incidentally, it does contain other folders that do not contain Java code.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With