revert some of pull 180 to allow builds with java 1.5

This didn't build with java 1.5