SDKMan Advanced Config

SDKMan Advance config

As you can see in previous post (“SDKMan Install”), SDKMan is an useful tool for manage your dev machine environments.

Advance config tips

An option that I recently discovered is the way to configure and install projects dependencies in one step.

For example in our .sdkmanrc file, we have the following settings:

java=11.0.11-hs-adpt

Suppose that, after some days we need to specify the Maven version (ex 3.3.9), we can add it in our file:

java=11.0.11-hs-adpt
maven=3.3.9

The only one CLI command we need to use is:

sdk env install

SDKMan checks our envs and if not present (maven in this example) install the missing sdk.

Automatic switch to the chosen JDK version

In your config file (~/.sdkman/etc/config), set true the “sdkman_auto_env” property.

sdkman_auto_env=true

Enjoy, Djacomo

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