[java] Use homebrew cask for installation