Modified the code so that it uses Java 1.6, which is still pretty common