I'm new to Java (though a proficient Ruby programmer), and I'm looking to write a non-trivial Java application (with Swing).
What I've been unable to work out is how I should lay out my files, and how I should 'load' them. For example in a Ruby application I might have:
.
|-- application.rb
|-- includes
| |-- chess
| | |-- bishop.rb
| | |-- castle.rb
| | |-- gameboard.rb
| | |-- horse.rb
| | |-- king.rb
| | |-- pawn.rb
| | |-- peice.rb
| | |-- player.rb
| | `-- queen.rb
| |-- chess.rb
| |-- house
| | |-- chimney.rb
| | |-- roof.rb
| | |-- wall.rb
| | `-- window.rb
| `-- house.rb
`-- README.md
Now in Java I understand that there are packages to be handled instead of modules, and I probably need to get Ant's build.xml
in there, etc. But I've yet to find a good guide to laying this all out.
Any help appreciated.
You can use the maven's Standard Directory Layout.
Also if you are just now starting the project I will recommend using maven instead of Ant. It takes far less work to start a project with maven.