I first noticed this for ./scripts/prog.sh. It uses the following incantations:
However if there is white space in either JAVA_OPTS or JAVA_HOME then these incantations will break.
Also, JAVA should be quoted as used below in case the file path has whitespace (quotes are missing in the original).
Finally note that JAVA_OPTS MUST NOT be quoted when it is being passed through to Java, so the following is correct.