Fixed some logic issues in the installer.
Updated Dockerfile to use java7.