Skip to content

Instantly share code, notes, and snippets.

View happygiraffe's full-sized avatar
💭
Probably not looking at GitHub…

Dominic Mitchell happygiraffe

💭
Probably not looking at GitHub…
View GitHub Profile
#!/bin/bash
#
# Provides a function that allows you to choose a JDK. Just set the environment
# variable JDKS_ROOT to the directory containing multiple versions of the JDK
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned
# up and set appropriately.
# Usage:
# Include in .profile or .bashrc or source at login to get 'pickjdk' command.
# 'pickjdk' alone to bring up a menu of installed JDKs on OS X. Select one.