Use homebrew's jar script writer and eliminate the environment variable caveat.