JDK (Java Development Kit)¶
Install¶
Install Java using SDKMAN with the following command:
Usage¶
Version listing¶
To list all available Java versions, use:
To list all installed and local Java versions, use:
Info
The above command lists the first 5 lines of the output from sdk list java and then filters the remaining lines to show only those that contain "installed" or "local only", ignoring case. This way, you can see the available versions as well as the ones you have installed or are available locally.
Version switching¶
To use a specific Java version, use:
To set a specific Java version as the default, use:
Configuration¶
Certificates¶
To list the certificates in the keystore, use the following command:
To add a certificate to the keystore, use the following command: