Fix build warnings. Require jdk min 1.7