Back out previous 3 commits (git merge errors); fix build for JDK 1.8.