refer to:
https://github.com/halcyon/asdf-java
1. 安装asdf
2. 安装asdf java plugin:
asdf plugin-add java https://github.com/halcyon/asdf-java.git
3. JAVA_HOME
直接 which java 然后设置到~/.bashrc中:
export JAVA_HOME=/home/siwei/.asdf/shims/
4. 安装maven 用asdf maven
asdf plugin-add maven https://github.com/skotchpine/asdf-maven
安装个最新版:
asdf install maven 4.0.0-alpha-2
asdf local maven 4.0.0-alpha-2
asdf reshim
which mvn
/home/siwei/.asdf/shims/mvn