On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.
Install Homebrew Cask first if you haven’t:
brew update
brew tap caskroom/cask
# Using applescript, sets the focus + foreground on a window by its title | |
# That works on OSX 10.7.5. | |
# @author Aurelien Scoubeau <[email protected]> | |
import argparse | |
import subprocess | |
parser = argparse.ArgumentParser(description='Utility to activate a window by title, for OSX') | |
parser.add_argument('title', help='Title of the window to activate') | |
args = vars(parser.parse_args()) |
Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.