replaced compare() call for backwards compatibility and stopped local Exceptions being RuntimeExpcetions
update java version to 1.6