SDKMan

SDKMan - Why use it

All devs, that work on several projects, have technical requirements for each of them.

Often in a Java project, the base requirements are:

  • JDK
  • Maven
  • Gradle
  • Apache JMeter
  • other strange things… :) (Hey the Demogorgon!)

In this situation, I think that the best choice is not to mess your dev system.

Before using SDKMan, I needed to edit my “JAVA_HOME”, “M2_HOME” envs variables, for each project.

SDKMan - How use it

In few words, that is the real reason why you are reading this blog, how use SDKMan in a couple of steps?

An example how to install Java 11

  1. Install JDK 11 with:
sdk install 11.0.11.hs-adpt
  • sdk list java for the list of available JDK
  1. Create a .sdkmanrc file in your project main dir:
java=11.0.11.hs-adpt
  1. Switch JDK
  • use sdk env for switch to right JDK.

Enjoy, Djacomo

Disclaimer: I’m Italian, so sorry for my bad English!