Java 6 Compatibility

Added the ability to build and run with Java 6.