Fix JAVA_HOME detection
Remove -o option from id command
Change finished to done to prevent confusion with failed