EUCA-6037 Fix Java version check in init script

Change parsing of the version field since we only care about the major and
minor. The patch version field can vary and we don't need it anyway.