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
Install SDKMAN!
-
Launch wsl terminal and execute following command to install SDKMAN!.
1
curl -s "https://get.sdkman.io" | bash
-
Open a new terminal or refresh the terminal with following command.
1
source ~/.bashrc
-
Check SDKMAN! version to validate.
1
sdk v
Install Java
- List all the available Java in SDKMAN!.
1
sdk l java
- Install the Java. (In my case I will use 8.0.275.hs-adpt)
1
sdk i java 8.0.275.hs-adpt
- Done.
Install Maven
- List all the available Maven in SDKMAN!.
1
sdk l maven
- Install Maven.
1
sdk i maven 3.6.3
- Done.