Added Java 1.5+ support