SDKMan

From Bonus Bits
Jump to: navigation, search

Description

This article has common SDKMan (Software Development Kit Manager) commands. SDKMan replaces GVM. SDKMan is a Java Development Framework Package manager. It is like RVM (Ruby Version Manager). It downloads various SDK programs into your user home and uses environment variables to allow you to switch between different versions on the fly. Either through CLI commands or by using a configuration file in your project.


Available Candidates

As of 02/01/2017

  1. Activator
  2. Ant
  3. AsciidoctorJ
  4. Ceylon
  5. CRaSH
  6. Gaiden
  7. Glide
  8. Gradle
  9. Grails
  10. Griffon
  11. Groovy
  12. GroovyServ
  13. Java
  14. JBake
  15. Jboss Forge
  16. Kobalt
  17. Kotlin
  18. Lazybones
  19. Leiningen
  20. Maven
  21. sbt
  22. Scala
  23. Spring Boot
  24. Sshoogr
  25. Vert.x


List All Available Candidates

sdk list


List Versions of a Specific Candidate

sdk list <candidate>
Example
sdk list groovy
================================================================================
Available Groovy Versions
================================================================================
 > * 2.4.8                2.3.3                2.1.3                1.8.7
   * 2.4.7                2.3.2                2.1.2                1.8.6
     2.4.6                2.3.11               2.1.1                1.8.5
     2.4.5                2.3.10               2.1.0                1.8.4
     2.4.4                2.3.1                2.0.8                1.8.3
     2.4.3                2.3.0                2.0.7                1.8.2
     2.4.2                2.2.2                2.0.6                1.8.1
     2.4.1                2.2.1                2.0.5                1.8.0
     2.4.0                2.2.0                2.0.4                1.7.9
     2.3.9                2.1.9                2.0.3                1.7.8
     2.3.8                2.1.8                2.0.2                1.7.7
     2.3.7                2.1.7                2.0.1                1.7.6
     2.3.6                2.1.6                2.0.0                1.7.5
     2.3.5                2.1.5                1.8.9                1.7.4
     2.3.4                2.1.4                1.8.8                1.7.3

================================================================================
+ - local version
* - installed
> - currently in use
================================================================================

Install an Available Candidate

  • Install the latest version of a candidate.
    sdk install <candidate name>
    
  • Install a specific version
    sdk install <candidate name> <version>
    
Example
sdk install groovy 2.4.8


Install Lastest Versions of All Installed Candidates

  • Install the latest version of all installed candidates.
    sdk upgrade
    


Upgrade to Latest SDKMan

  • sdk selfupdate
    


List Current Installed Candidates Default Version

  • sdk current
    
Using:

gradle: 3.3
groovy: 2.4.8
maven: 3.3.9


List All Outdated Candidates Versions

  • sdk outdated
    
All candidates are up-to-date


Remove a Specific Version of a Candidates

  • Remove an older version of a candidate.
    sdk uninstall <candidate> <version>
    
Example
sdk uninstall groovy 2.4.7


Remove an Entire Candidate and All its Versions

  • Remove all versions of a candidate.
    sdk uninstall <candidate>
    
Example
sdk uninstall maven


Switch to an Install Version of a Candidate Temporarily

To temporarily switch to a specific version that is not your default version of a candidate.

sdk use <candidate> <version>
Example
sdk use groovy 2.9


Set an Install Candidate Version as Default

To set to a specific candidate version as the default version.

sdk default <candidate> <version>
Example
sdk default groovy 3.3


Troubleshooting

  1. Command sdk install groovy Error Stop! groovy is not a valid candidate.
    1. Make sure you have sourced the sdkman init script
      source "$HOME/.sdkman/bin/sdkman-init.sh"
      
    2. Flush candidates local cache
      sdk flush candidates
      
    3. Also it could be an internet access issue such as a proxy


Related Articles


Sources