跳至主要內容

SDKMan! (JDK and JVM related SDK management tool)D

SDKMan is a SDK management tool based on Unix system. It can also manage multiple JDK and switch the version whenever you need.

The official site is below

https://sdkman.io/

You can just go through it if you want. Here, just gonna briefly explain how to install and use it.

Installation

Open your terminal and enter

$ curl -s "https://get.sdkman.io" | bash

Once the installation is done, then open a new tab and enter

source "$HOME/.sdkman/bin/sdkman-init.sh"

Then run the following command to see if it works

sdk version

Usage

To install latest Java, you can simply just enter

sdk install java

To specify a version via

sdk install java {version-identifier}

To list all candidates that are able to install via SDKMan!

sdk list

To list all available versions for a specific SDK on SDKMan! (Using Java as an example)

sdk list java

Once you installed a SDK, you can check what version is using, set default version and switch to different version by the following commands (Using Java as an example)

// Check current Java version
sdk current java

// Set default Java version
// The version must be installed
sdk default java 11.0.19-amzn

// Switch Java version to other in the current shell
sdk use java 11.0.19-amzn
分類:Utils

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題