do an explicit check for Java 7
Conflicts:
	tools/setup.sh
Should escape dot since =~ does regexp matching.