Update handling of JAVA_OPTS in script so that it works with the bash array.