fixed JAVA_VERSION detection in try script, which

failed if the JAVA_OPTIONS environment variable
was set.