๐Ÿ“ฆ deluan / macos-jdk

My take on JDK switchers for macOS

โ˜… 0 stars โ‘‚ 0 forks ๐Ÿ‘ 0 watching
bashjavajdkjvmmacosoh-my-zshzplugzsh
๐Ÿ“ฅ Clone https://github.com/deluan/macos-jdk.git
HTTPS git clone https://github.com/deluan/macos-jdk.git
SSH git clone git@github.com:deluan/macos-jdk.git
CLI gh repo clone deluan/macos-jdk
Deluan Deluan fix ~/.jdkversion detection e394285 6 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“„ macos-jdk.sh
๐Ÿ“„ README.md
๐Ÿ“„ README.md

A JDK switcher for macOS


Install

Can be used in both Bash and ZSH. Just add it to your .bashrc/.zshrc and you're all set.

Using it with a ZSH framework/plugin manager

zplug

Load macos-jdk as a plugin in your .zshrc

zplug "deluan/macos-jdk"

zgen

Include the load command in your .zshrc

zgen load deluan/macos-jdk
zgen save

antigen

Bundle macos-zsh in your .zshrc

antigen bundle deluan/macos-jdk
antigen apply

As an Oh My ZSH! custom plugin

Clone macos-jdk into your custom plugins repo

git clone https://github.com/deluan/macos-jdk $ZSH_CUSTOM/plugins/macos-jdk
Then load as a plugin in your .zshrc

plugins+=(macos-jdk)

Usage

Show all installed versions

$ jdk

Select a specific version (only valid for current session)

$ jdk 8

To set the default jdk to be used in your system, create a ~/.jdkversion file with the version number in it