Pains & Desires
brew install java
Installing Jabba
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
jabba
To see the version of jabba installed:
jabba --version
To see ALL the available versions of Java:
jabba ls-remote
To see all the versions of Java 13:
jabba ls-remote | grep @1.13
Then choose the Java distribution you like and install the latest version.
For example looking at the above choices you might choose "[email protected]".
You can install it through jabba with this command:
java install [email protected]
This will install the latest 1.13.X version of the openjdk flavor of Java, which is 1.13.0 (keep in mind that the dashes represent pre-releases). It should automatically switch your current shell's Java version to the version you just installed as well.
To check the current Java version you're using:
java --version
Suppose though that you open a new shell that defaults back to Java 14. You already have Java 13 installed, so you just need to use it:
jabba use [email protected]
Final Remarks
By contrast, with nvm you can run these two short and sweet commands:
nvm i v13 nvm use v13
Sadly, jabba doesn't support the "i" alias for install, you gotta type that baby out every dang time.
* "aww shucks", says someone in the back of the crowd. *
Not to worry though. I'm confident we can all band together to get this extremely necessarily to the survival of the human race feature added to jabba. Please thumbs-up my issue here: https://github.com/shyiko/jabba/issues/666
That's all for now. Happy coding, err' body!