We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

NEWBIE: Eclipse standards for packages and directory structure?

BrianMc1958
BrianMc1958 asked
on
Medium Priority
257 Views
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:

C:\com\MyCompany\projectA
C:\com\MyCompany\projectB

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

C:\com\MyCompany\projectA\src
C:\com\MyCompany\projectA\classes

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?  

Thanks!
BrianMc1958







Comment
Watch Question

Principal Technologist
CERTIFIED EXPERT
Commented:
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'.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
>> 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.
Mayank SPrincipal Technologist
CERTIFIED EXPERT

Commented:
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).
Mayank SPrincipal Technologist
CERTIFIED EXPERT

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

You can have many packages inside a project.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.