SDKMAN! (formerly known as GVM- Groovy enVironment Manager) is a tool for managing parallel versions of multiple SDK on Unix environment.
It will become extreme handy when you need to test your Java application with different Java version and distribution.
Although I don’t need an environment with multiple Java version, but being a lazy developer, setting up java environment just too much work for me.
We are going to set up our development in WSL with:
- Java 1.8
- Maven 3.6.3
Launch wsl terminal and execute following command to install SDKMAN!.
curl -s "https://get.sdkman.io" | bash
Open a new terminal or refresh the terminal with following command.
Check SDKMAN! version to validate.
- List all the available Java in SDKMAN!.
sdk l java
- Install the Java. (In my case I will use 8.0.275.hs-adpt)
sdk i java 8.0.275.hs-adpt
- List all the available Maven in SDKMAN!.
sdk l maven
- Install Maven.
sdk i maven 3.6.3