Easily switch between java versions with SDKMAN! and 'j'
You usually want to keep your projects up-to-date with the latest java version. But sometimes that is not possible.
Then you need to switch between different java versions, depending on the project you are working on.
SDKMAN!
https://sdkman.io/ is my recommended tool for the job.
But it has one downside:
In my day-to-day development job I usually don’t care much about java’s patch versions. And I usually don’t care about using amazon corretto, OpenJDK, Oracle or Zulu java.
I don’t want to remember the specific vendor and subversion; I just want “some” java 17.
This is where “j” comes in:
j
j↗ is an easy to use, but hard to google script that does a best guess of my desired java version.
So I just type
j 17
and I get some java 17.
btw.:
For switching versions of node.js and npm I use node version manager
Happy new year!
Links
- My favourite tools for Java Software Development on Linux
- My favourite Desktop Open-Source Software and Package Managers
Any comments or suggestions? Leave an issue or a pull request or discuss on reddit!