Loading Files using Java in a location independent way

Location independent access to Java Resources is a nice tutorial if you would like to know how to load files in java without specifying absolute paths. In a nutshell its done by using methods getResource and getResourceAsStream method in class Class. There is another set of methods in ClassLoader for loading system resources.
Smart and funny [...]

Import test and static data using Hibernate’s hibernate.hbm2ddl.auto

Hibernate comes with a nifty feature that makes it unnecessary to use DBUnit or any tool for initializing your test database with data before the unit and integration tests are run. Ofcourse you need to be using Hibernate Core or its JPA module to take advantage of this. Steps to achieve this are very straightforward
1. [...]