The SDKMAN! Command Line Interface

Related tags



The Software Development Kit Manager Command Line Interface

Build Status Latest Version Backers on Open Collective Sponsors on Open Collective Slack

SDKMAN is a tool for managing parallel Versions of multiple Software Development Kits on any Unix based system. It provides a convenient command line interface for installing, switching, removing and listing Candidates.

See documentation on the SDKMAN! website.


Open your favourite terminal and enter the following:

$ curl -s | bash

If the environment needs tweaking for SDKMAN to be installed, the installer will prompt you accordingly and ask you to restart.

Running the Cucumber Features

All SDKMAN's BDD tests describing the CLI behaviour are written in Cucumber and can be found under src/test/cucumber/sdkman. These can be run with Gradle by running the following command:

$ ./gradlew test

To perform development, you will need to have a JDK 8 or higher installed which can be obtained by running the following after installing SDKMAN:

$ sdk install java

Using Docker for tests

You can run the tests in a Docker container to guarantee a clean test environment.

$ docker build --tag=sdkman-cli/gradle .
$ docker run --rm -it sdkman-cli/gradle test

By running the following command, you don't need to wait for downloading Gradle wrapper and other dependencies. The test reports can be found under the local build directory.

$ docker run --rm -it -v $PWD:/usr/src/app -v $HOME/.gradle:/root/.gradle sdkman-cli/gradle test

Local Installation

To install SDKMAN locally running against your local server, run the following commands:

$ ./gradlew install
$ source ~/.sdkman/bin/

Or run install locally with Production configuration:

$ ./gradlew -Penv=production install
$ source ~/.sdkman/bin/


This project exists thanks to all the people who contribute.


Thank you to all our backers! [Become a backer]


Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

  • sdkman reports offline mode (which is not)

    sdkman reports offline mode (which is not)

    $ sdk install springboot
    SDKMAN can't reach the internet so going offline. Re-enable online with:
      $ sdk offline disable
    sdk:local:70: ^[[01;31m^[[Kspringboot^[[m^[[K: can't create local array elements
    $ sdk version
    SDKMAN 3.2.4
    opened by gAmUssA 55
  • Bug: Unable to update

    Bug: Unable to update

    $ sdk version
    WARNING: SDKMAN is out-of-date and requires an update. Please run:
    sdk update
    ==== BROADCAST =================================================================
    * 02/07/18: Kscript 2.4.5 released on SDKMAN! #kscript
    * 28/06/18: Micronaut 1.0.0.M2 released on SDKMAN! #micronautfw
    * 27/06/18: Infrastructor 0.2.0 rolling out. With stronger encryption and new task progress UI.
    SDKMAN 5.6.4+305
    $ sdk update
    -bash: -1: substring expression < 0

    I'm using MacOS High Sierra.

    opened by rbatllet 45
  • 'list installed' command?

    'list installed' command?


    How to find what is installed with Sdkman?

    There doesn't seem to be a sdk list installed commands, and just calling sdk list simply shows all potential SDKs to install.


    opened by eprozium 41
  • Add OpenJDK Java Options

    Add OpenJDK Java Options

    Feature Request: Offer OpenJDK options for Java.

    I know that you can manually install local versions, but this is a bit kludgy and doesn't take advantage of Sdkman tracking updates.

    opened by pluttrell 40
  • Install java 8 fails on cygwin in some cases

    Install java 8 fails on cygwin in some cases

    On Cygwin, tried sdk install java and got following output:

    $ sdk install java
    Oracle requires that you agree with the Oracle Binary Code License Agreement
    prior to installation. The license agreement can be found at:
    Do you agree to the terms of this agreement? (Y/n): Y
    Downloading: java 8u111
    In progress...
    ######################################################################## 100.0%
    Repackaging java 8u111...
    -bash: /home/Jonathan/.sdkman/tmp/mbgywYdNTdwToa040cg3Azu3oUSUBGsp.bin: Device or resource busy
    mv: cannot stat '/cygdrive/c/temp/jdk': No such file or directory
    zip error: Nothing to do! (try: zip -qr /home/Jonathan/.sdkman/tmp/ . -i .)
    Done repackaging...
    mv: cannot stat '/home/Jonathan/.sdkman/tmp/': No such file or directory
    unzip:  cannot find or open /home/Jonathan/.sdkman/archives/, /home/Jonathan/.sdkman/archives/ or /home/Jonathan/.sdkman/archives/
    rm: cannot remove '/home/Jonathan/.sdkman/archives/': No such file or directory
    Stop! The archive was corrupt and has been removed! Please try installing again.

    To check device or resource busy, I ran handle command for windows:

    C:\>handle mbgywYdNTdwToa040cg3Azu3oUSUBGsp.bin
    Nthandle v4.1 - Handle viewer
    Copyright (C) 1997-2016 Mark Russinovich
    Sysinternals -
    bash.exe           pid: 8008   type: File           3D0: C:\Users\Jonathan\.sdkman\tmp\mbgywYdNTdwToa040cg3Azu3oUSUBGsp.bin

    And then I ran ps within Cygwin:

    $ ps
          PID    PPID    PGID     WINPID   TTY         UID    STIME COMMAND
         1948   13268    1948       8008  pty3      197609 19:57:39 /usr/bin/bash
         7532   12708    7532       8256  pty2      197609 02:13:00 /usr/bin/ps
         1044    1164    1044      15392  pty0      197609 19:28:45 /usr/bin/bash
        13268       1   13268      13268  ?         197609 19:57:39 /usr/bin/mintty
        14852       1   14852      14852  ?         197609 19:51:14 /usr/bin/mintty
        12708   14852   12708       4204  pty2      197609 19:51:14 /usr/bin/bash
         1164       1    1164       1164  ?         197609 19:28:45 /usr/bin/mintty
    opened by jbuhacoff 38
  • Remove hard-coded references to candidates

    Remove hard-coded references to candidates

    It seems wrong to hard-code the candidate names when they are available from the server. It also makes it hard to add new candidates. The scripts pretty much work with a really small change to, but the tests also rely on the PATH being set, so there is a change to the tests as well to make them pass.

    opened by dsyer 36
  • Point at a local installation for dev purpose

    Point at a local installation for dev purpose

    As a Groovy developer, I often install development versions of Groovy locally. It's usually the master branch of upcoming Groovy releases, etc.

    It'd be nice if I could tell GVM to use my local installation as well, in addition to all the known release versions. For example:

    gvm install local groovy 2.1.0-SNAPSHOT /dev/groovy/master/target/install

    Or something like that. I'm sure you'll find a better command-line to use.

    opened by glaforge 31
  • GVM doesn't work with Fish shell

    GVM doesn't work with Fish shell

    The previous work-around for using GVM with the Fish shell was to add all the 'current' links to the PATH. This appears to be broken with newer versions of GVM. The 'current' link is only set to the default version of the given tool and doesn't get updated when 'use'-ing a different version.

    opened by ctwise 29
  • Issue installing gvm on fresh cygwin install

    Issue installing gvm on fresh cygwin install

    I have a new Windows 7 laptop. First thing I did was install Cygwin. Then while setting up my dev environment I decided to try Gvm.

    I added the following lines at the end of my .bashrc: export JAVA_HOME=/cygdrive/c/dev/sdks/jdk1.7.0_25/ export PATH=$PATH:$JAVA_HOME/bin

    This being a default Cygwin install, with nothing customized yet, my .bashrc file is sourced by my .bash_profile file when I launch Cygwin.

    I followed the simple gvm install process, by running the curl command. When I open Cygwin, post-install, I get the following problem: -bash: export: HTTP/1.1': not a valid identifier -bash: export:200': not a valid identifier ': not a valid identifier -bash: export: CONTENT-TYPE:': not a valid identifier ': not a valid identifierN -bash: export:CONTENT-LENGTH:': not a valid identifier ': not a valid identifier -bash: export: `CONNECTION:': not a valid identifier ': not a valid identifierE ': not a valid identifier A new version of GVM is available...

    The current version is HTTP/1.1 200 OK Content-Length: 5 Connection: keep-alive

    1.3.3, but you have 1.3.3.

    Would you like to upgrade now? (Y/n)y bash: line 1: HTTP/1.1: No such file or directory bash: line 2: Content-Type:: command not found bash: line 3: Content-Length:: command not found bash: line 4: Connection:: command not found bash: line 5: $'\r': command not found

    Updating gvm... warning [C:\cygwin64\home\eweibust.gvm\tmp\]: 97 extra bytes at beginning or within zipfile (attempting to process anyway)

    Successfully upgraded GVM.

    Please open a new terminal, or run the following in the existing one:

    source "/home/eweibust/.gvm/bin/"

    [email protected] ~ $ echo $PATH | tr ':' '\n' /home/eweibust/.gvm/vertx/current/bin /home/eweibust/.gvm/lazybones/current/bin /home/eweibust/.gvm/groovyserv/current/bin /home/eweibust/.gvm/groovy/current/bin /home/eweibust/.gvm/griffon/current/bin /home/eweibust/.gvm/grails/current/bin Content-Typet/.gvm/HTTP/1.1 200 OK Content-Length Connection gradle/current/bin /usr/local/bin /usr/bin /cygdrive/c/Windows/system32 /cygdrive/c/Windows /cygdrive/c/Windows/System32/Wbem /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0 /cygdrive/c/dev/sdks/jdk1.7.0_25//bin

    [email protected] ~ $

    It appears there is a problem with the bash script gvm is running, which is then corrupting my PATH (shown in the echo $PATH above).

    opened by erikweibust 29
  • Completion script initialisation problems

    Completion script initialisation problems

    Using sdkman SDKMAN 5.11.2+698 on Ubuntu Linux 20.04 and bash 5.0.17(1) with the necessary code in .bashrc to put it in the path.

    When I start a new terminal, i.e. invoke a new bash, output like the following sometimes appears on the console:

    ommand not found
    36m====: command not found
    Command '0music' not found, did you mean:
      command 'music' from deb music-bin (1.1.16-1.1build2)
    Try: sudo apt install <deb name>
    Command '0music' not found, did you mean:
      command 'music' from deb music-bin (1.1.16-1.1build2)
    Try: sudo apt install <deb name>
    Command '0music' not found, did you mean:
      command 'music' from deb music-bin (1.1.16-1.1build2)
    Try: sudo apt install <deb name>
    ================================================================================: command not found

    I did not manage to find out why/when this happens, it appears to be almost random, though it usually happens when opening the first terminal after a restart or after a longer time.

    I have observed this behaviour for several weeks now and I am certain this only happens when the SDKMAN-related code is active in .bashrc, never happens when I comment that out.

    The "command not found" complaints I get appear to come from strings inside the bash prompt definition and from the names of random directories in my home directory. I have no idea at all what could be going on here, but it became so annoying that I usually deactivate sdkman completely.

    So sadly, I cannot provide steps to reproduce because this problem occurs seemingly randomly (but often enough to be very annoying).

    opened by johann-petrak 26
  • Bug: sdkman download candidate tomcat

    Bug: sdkman download candidate tomcat

    image image You have to change your permissions yourself

    opened by tonycody 0
  • Drop beta query parameter for selfupdate.

    Drop beta query parameter for selfupdate.

    The query parameter will be dropped in the new version of sdkman-hooks, and instead is inferred and propagated by nginx based on the subdomain

    opened by marc0der 0
  • Introduce beta api for latest build

    Introduce beta api for latest build

    • Pass release channel from GitHub actions to build as env parameter.
    • Drop beta query parameter on selfupdate.
    opened by marc0der 0
  • Display a warning when Bash is run in POSIX mode

    Display a warning when Bash is run in POSIX mode

    When SDKMAN! is run in POSIX mode, a warning should be displayed and Bash completion turned off.

    opened by helpermethod 0
  • Feature: Using a wildcard approach to install major versions

    Feature: Using a wildcard approach to install major versions

    As a Java developer user, I would like to be able to install the latest Java JDK Version 7 from a specific vendor and am not worried about the minor version.

    I create Java Jupyter Notebooks for Java code samples using MyBinder and Docker images. Since the Docker image is created on the fly from the supplied Dockerfile, I need to specify the specific JDK version during installation. Since the vendors deprecate the older JDK minor versions hard-coding the minor versions will break the build.

    I have created a workaround but I would like to see if there can be some kind of wildcard approach to supporting this. This could work similarly to sdk install java 7*zulu.

    duplicate enhancement 
    opened by franceme 1
  • candidates shared directory

    candidates shared directory

    It is recommended that the SDK candidates be placed externally. So the container can share the candidates. The container only needs to install the sdkman base environment, and the shared directory used by the candidates

    opened by tonycody 1
  • Bug: 404 only on `sdk list java`

    Bug: 404 only on `sdk list java`

    Bug report

    The command sdk list java returns a 404 message (as can be seen in the attached screenshot) To reproduce

    Run sdk list java while using sdkman through a proxy. See more info below System info

    • Ubuntu 20.04.2 LTS
    • zsh 5.8 (x86_64-ubuntu-linux-gnu
    • SDKMAN 5.12.2

    I have seen some others reporting the same i.e. and I originally added a comment to this issue, but after not receiving any reply I try opening a new issue instead. I add the text with relevant information here:

    I use sdkman version: 5.12.2 on a company computer that is airgapped. We set up a proxy for the requests and have changed the environment variable SDKMAN_CANDIDATES_API= and the proxy then points to

    This works perfectly for all candidates except java. I am also able to install java if I look up the version from another "normal" connected computer, so it is only when running sdk list java I get this issue. I attached an image showing the difference when running sdk list maven and sdk list java

    I am aware this is not the default supported way of using sdkman, but as it works for all all candidates (at least the ones I have tested), could there be some kind of bug? Do you have any recommendations or fixes I could try in order to get this command to work?


    opened by momrak 2
  • Reshape binary distribution to be SDK compliant

    Reshape binary distribution to be SDK compliant

    This PR reshapes the binary zip so that it may be extracted in place during the installation process.

    • Extract custom archive tasks to gradle folder.
    • Prepare and consume files in new stage build folder.
    • Add test task dependency on script prep tasks.
    • Silence noisy logs.

    May only be merged once the sdkman-hooks are in place to handle this new form

    opened by marc0der 0
  • Bug: [ interferes/breaks gcp cloud/kubectl zsh completions]

    Bug: [ interferes/breaks gcp cloud/kubectl zsh completions]

    Bug report When using gcloud sdk & kubectl zsh completions, the appears to remove or break those completions (i.e. they fail to work). (also using the ohmyzsh sdkman & kubectl plugins)

    Moving the call to before the gcloud sdk & kubectl completion ensures completions for all works correctly.

    To reproduce Place the following in .zshrc:

    <snip - ohmyzsh defaults>
    # The next line updates PATH for the Google Cloud SDK.
    if [ -f '/home/******/share/gcloud/' ]; then . '/home/*******/share/gcloud/'; fi
    # The next line enables shell command completion for gcloud.
    if [ -f '/home/******/share/gcloud/' ]; then . '/home/******/share/gcloud/'; fi
    # Completions for kubectl
    (( $+commands[kubectl] )) && source <(kubectl completion zsh)
    #export SDKMAN_DIR="/home/*******/.sdkman"
    [[ -s "/home/********/.sdkman/bin/" ]] && source "/home/*******/.sdkman/bin/"

    System info

    • Arch Linux (kernel 5.13.6)
    • zsh 5.8.1
    • zsh-completions 0.33.0-1
    • oh-my-zsh r6081.5377cc37c-1
    • gcloud sdk 349.0.0
    • kubectl 1.18.18
    opened by andrewrembrandt 7
  • Bug: curl retry logic not documented/enabled by default

    Bug: curl retry logic not documented/enabled by default

    Bug report When running sdk install gradle 7.1.1 at I encountered:

    curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104

    Looking at the source, it seems I need to set sdkman_curl_retry=n, which isnt mentioned on .

    As sdkman knows these files should exist, it seems like this config should be enabled by default, even if only at sdkman_curl_retry=1 to avoid minor network disruptions and also set curl --retry-delay <seconds> Wait time between retries to a sensible value if it doesnt default to a value suitable for sdkman behaviour.

    #5 1124.7
    #5 1124.7 Downloading: java 11.0.11.hs-adpt
    #5 1124.7
    #5 1124.7 In progress...
    #5 1124.7
    ######################################################################## 100.0%-=#=#   #   #
    #5 1257.9
    #5 1257.9 Repackaging Java 11.0.11.hs-adpt...
    #5 1270.8
    #5 1270.8 Done repackaging...
    #5 1273.0
    #5 1273.0 Installing: java 11.0.11.hs-adpt
    #5 1275.3 Done installing!
    #5 1275.3
    #5 1275.3
    #5 1275.3 Setting java 11.0.11.hs-adpt as default.
    #5 1277.8
    #5 1277.8 Downloading: gradle 7.1.1
    #5 1277.8
    #5 1277.8 In progress...
    #5 1277.8
    #############################                                             40.6%curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104

    To reproduce Simulate a brief network disconnect during sdkman install

    System info Ubuntu docker.

    opened by jayvdb 0
The Software Development Kit Manager
Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas

Arthas Arthas is a Java Diagnostic tool open sourced by Alibaba. Arthas allows developers to troubleshoot production issues for Java applications with

Alibaba 27.1k Sep 15, 2021
Embulk: Pluggable Bulk Data Loader.

What's Embulk? Embulk is a parallel bulk data loader that helps data transfer between various storages, databases, NoSQL and cloud services. Embulk su

Embulk 1.6k Sep 13, 2021
JGit project repository (jgit)

Java Git An implementation of the Git version control system in pure Java. This project is licensed under the EDL (Eclipse Distribution License). JGit

Eclipse Foundation 1k Jul 5, 2021
Manage your Java environment

Master your Java Environment with jenv Website : Maintainers : Gildas Cuisinier Future maintainer in discussion: Benjamin Berman As

jEnv 3.9k Sep 14, 2021
a pug implementation written in Java (formerly known as jade)

Attention: jade4j is now pug4j In alignment with the javascript template engine we renamed jade4j to pug4j. You will find it under

neuland - Büro für Informatik 697 Jul 27, 2021
(cross-platform) Java Version Manager

jabba Java Version Manager inspired by nvm (Node.js). Written in Go. The goal is to provide unified pain-free experience of installing (and switching

Stanley Shyiko 2k Sep 14, 2021
A Java library for designing good error messages

JDoctor, a Java library for good error messages Designing good error messages is hard. In Java, most often, developers just rely on throwing exception

Cédric Champeau 38 Jun 18, 2021
Gephi - The Open Graph Viz Platform

Gephi - The Open Graph Viz Platform Gephi is an award-winning open-source platform for visualizing and manipulating large graphs. It runs on Windows,

Gephi 4.5k Sep 18, 2021
FastAop 是一款基于 Java Annotation Processing 的 AOP 框架

Java 高性能 AOP 框架 框架简介 FastAop 是一款基于 Java Annotation Processing 的 AOP 框架,其原理和 Lombok 类似,通过对编译过程的拦截,修改方法的语法树并织入切面代码从而实现了 AOP 的功能,相较于传统的 AspectJ、Spring-AO

fastlight 75 Aug 27, 2021
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon

Stfalcon Fixturer A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can

Stfalcon LLC 30 Apr 7, 2021
Solutions of many problems from HackerRank

Solutions of some problems from HackerRank made specially for beginners and who are in the intermediate level If you like this project, please leave m

Mohamed Metwalli 9 May 3, 2021
java port of Underscore.js

underscore-java Requirements Java 1.8 and later or Java 11. Installation Include the following in your pom.xml for Maven: <dependencies> <dependency

Valentyn Kolesnikov 349 Sep 13, 2021
An open-source Java library for Constraint Programming

Documentation, Support and Issues Contributing Download and installation Choco-solver is an open-source Java library for Constraint Programming. Curre

null 545 Sep 9, 2021
Java Constraint Programming solver [] ( JaCo

null 183 Aug 21, 2021
Code for Techniques for Maintainable Quarkus Applications

stichingfacts project This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please visit its we

Ana Maria Mihalceanu 8 May 27, 2021