re-structre

Change default source directory src/java in eclipse for java project

Prepare directory structure for maven by changing the default src

Probably you are using maven and wanted to change the directory structure.

Since maven recommends the standard src/main/java src/main/resource you might want to change it that way

Here is how to do it in eclipse.

First create the folder structure on the project in which ever way you would want to do it. I would use simple command like mkdir folderName to create it.

1. right click on the project, and hit refresh, make sure the folders you created are listed there.

2. Right click on the project, select properties and select java build path

3. Go to source tab

4. select and remove the current source folder, by default it would be src folder

5. Hit the Add newthen select your folder structure there.

maven directory structure

maven directory structure

This would change the original structure of the your java project from src to the one maven compatible.

See how to use maven to create starter boilerplate application
Get started with step by step j2ee and maven tutorial using eclipse

Can you solve these cool algorithm problems? See their solution as well

How do you find the maximum consecutive sum from the given array

You are given billion numbers and to look for a couple of missing numbers

From list of numbers in array, find those that are complementary to the given number