SDKMan: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 61: Line 61:
java=21.0.2-tem
java=21.0.2-tem
EOF
EOF
</source>
|}
==Local Install==
{|
|valign='top'|
<source lang='bash'>
sdk install java 8  /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
sdk install java 11 /usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)
sdk install java 17 /usr/lib/jvm/java-17-openjdk-$(dpkg --print-architecture)
sdk install java 21 /usr/lib/jvm/java-21-openjdk-$(dpkg --print-architecture)
</source>
|valign='top'|
<source lang='bash'>
sdk use java 8
sdk use java 11
sdk use java 17
sdk use java 21
</source>
|valign='top'|
<source lang='bash'>
sdk uninstall java 8
sdk uninstall java 11
sdk uninstall java 17
sdk uninstall java 21
</source>
</source>



Revision as of 09:43, 5 March 2024

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
cat ~/.bashrc 
sdk version

Help

Usage: sdk <command> [candidate] [version]
       sdk offline <enable|disable>

   commands:
       install   or i    <candidate> [version] [local-path]
       uninstall or rm   <candidate> <version>
       list      or ls   [candidate]
       use       or u    <candidate> <version>
       config
       default   or d    <candidate> [version]
       home      or h    <candidate> <version>
       env       or e    [init|install|clear]
       current   or c    [candidate]
       upgrade   or ug   [candidate]
       version   or v
       help
       offline           [enable|disable]
       selfupdate        [force]
       update
       flush             [tmp|metadata|version]
sdk default java 23.1.2.r21-mandrel

SDKMan RC

sdk env
sdk env init

sdk env clear
sdk env install
tee ./.sdkmanrc  >/dev/null <<'EOF'
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=21.0.2-tem
EOF

Local Install

sdk install java 8  /usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
sdk install java 11 /usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)
sdk install java 17 /usr/lib/jvm/java-17-openjdk-$(dpkg --print-architecture)
sdk install java 21 /usr/lib/jvm/java-21-openjdk-$(dpkg --print-architecture)
sdk use java 8
sdk use java 11
sdk use java 17
sdk use java 21
sdk uninstall java 8
sdk uninstall java 11
sdk uninstall java 17
sdk uninstall java 21

Management

sdk install springboot
sdk install quarkus
sdk install groovy
sdk install gradle
sdk install jbang
sdk install maven
sdk install java
sdk install springboot {verion-number}
sdk install quarkus {verion-number}
sdk install groovy {verion-number}
sdk install gradle {verion-number}
sdk install jbang {verion-number}
sdk install maven {verion-number}
sdk install java {verion-number}
sdk upgrade springboot
sdk upgrade quarkus
sdk upgrade groovy
sdk upgrade gradle
sdk upgrade jbang
sdk upgrade maven
sdk upgrade java

Playground

sdk install java 23.1.2.r21-mandrel 
sdk install java 21.0.2-graalce
sdk install java 21.0.2-graal
sdk use java 23.1.2.r21-mandrel 
sdk use java 21.0.2-graalce
sdk use java 21.0.2-graal
sdk uninstall java 23.1.2.r21-mandrel 
sdk uninstall java 21.0.2-graalce
sdk uninstall java 21.0.2-graal

sdk list springboot
sdk list quarkus
sdk list groovy
sdk list gradle
sdk list jbang
sdk list maven
sdk list java

References