Snippet to create a java standard layout from a shell.

To create a java project standard directory layout from a unix shell (tested on bash) just type the following snippet.

mkdir -p src/{main,test}/{java,resources}

mkdir creates directories.

-p is used to tell mkdir to create parents if they don’t exist.

src/{main,test} is used to create a directory called src with 2 nested directories: main and test.

/{java,resources} tells to create 2 directories in each of main and test named java and resources.

The resulting directory layout is the following:
└── src
├── main
│   ├── java
│   └── resources
└── test
│ ├── java
│ └── resources
.... other stuff