Use `sh`  for portability and check user permission before modify $JAVA_HOMEBASE/current