NEWBIE: Eclipse standards for packages and directory structure?

Posted on 2006-03-22
Last Modified: 2010-03-31
Dear Experts,

I'm trying to set up my directory structure for multiple projects and packages under Eclipse.  There will be a one-to-one relationship between projects and packages.

I now have all my projects under the structure:


Under THOSE directories, how are source files and classes typically organized?  I had previously done this (under JBuilder):


Eclipse seems to default to this:

C:\com\MyCompany\projectA\           (Source goes directly under "projectA")
C:\com\MyCompany\projectA\bin       ("bin" instead of "classes")

Is there a standard in general?  A standard for Eclipse?  


Question by:BrianMc1958
    LVL 30

    Accepted Solution

    I would recommend you use small-case for all package-names (make it mycompany instead of MyCompany). In Eclipse, you can right-click on the Project, goto Java Build Path and configure the folder for source/ output using the Source (and other) tabs which you will find there. You can make it 'src' for source and 'classes' for classes. By default, I guess Eclipse uses the project-folder itself (I could be wrong). Maybe that in your case, somebody changed it to 'bin'.
    LVL 30

    Expert Comment

    >> right-click on the Project, goto Java Build Path

    In the Source tab, select whatever you have and click on Remove. Then click on "Add Folder". In the window which is shown, select "Create new folder", name it as 'src' and click on OK. In the default output folder shown below, change it to projectname\classes.
    LVL 30

    Expert Comment

    Another option is to goto Window -> Preferences -> Java -> Build Path and specify Source and Output folder there. The same settings will apply to all projects that you create in Eclipse (the above were only for one specific project).
    LVL 30

    Expert Comment

    >> There will be a one-to-one relationship between projects and packages.

    You can have many packages inside a project.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now