MacOS Tips
Install fonts
- To install fonts on MacOS, move the fonts to
~/Library/Fonts
Show hidden files in File → Open dialog
- Hit
Cmd + Shift + .
Unmount flash drives
- Flash drives are mounted under
/Volumes
- To unmount them, use
diskutil unmount
Show Desktop
F11
(might have to enable in Mission Control settings)
Clear terminal scrollback
- To clear terminal scrollback in MacOS:
Edit -> Clear Scrollback
JDK Setup Notes
- To install a JDK from homebrew:
- Enable the AdoptOpenJDK brew tap:
brew tap AdoptOpenJDK/openjdk
- Install OpenJDK 8 with
brew cask install adoptopenjdk8
- Enable the AdoptOpenJDK brew tap:
- To easily switch JDK versions, add the following to your
.bashrc
jdk() { version=$1 export JAVA_HOME=$(/usr/libexec/java_home -v"$version"); java -version }
- AdoptOpenJDK installs its JDKs to
/Library/Java/JavaVirtualMachines/adoptopenjdk-<version>.<jdk|jre>
- On my work machine:
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk
- On my work machine:
- To configure VS Code for Java development
- Install the Java Development Extension Pack
- Configure the JDK 8 runtime
- Open the settings for
Language Support For Java(TM) by Red Hat
- Edit the
runtimes
variable - Add the following to the
java.configuration.runtimes
array:[ { "name": "JavaSE-1.8", "path": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk" }, { "name": "JavaSE-11", "path": "/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk" } ]
- Open the settings for