How to set gradle path after installing using sdkman How to set gradle path after installing using sdkman hadoop hadoop

How to set gradle path after installing using sdkman


sdkman installs software only for your current user (placed under $HOME/.sdkman). When you login as another user you will not have access to them. sdkman has init scripts called from your .bashrc/.zshrc that will append to your PATH. On my account gradle is /Users/marvi/.sdkman/candidates/gradle/current/bin/gradle.

For a multi user install I would do a manual install. First option here: http://howtoprogram.xyz/2016/09/06/install-gradle-ubuntu-16-04/


One alternative would be install SDKMan as a shared component

export SDKMAN_DIR="/usr/local/sdkman" && curl -s "https://get.sdkman.io" | bash

Then install shared SDK component, i.e. gradle

sdk install gradle 4.10.2

Then for each user you want access to this 'shared' SDKs, just edit .bashrc or .profile file on the home path of those user and append these lines

export SDKMAN_DIR="/usr/local/sdkman"[[ -s "/usr/local/sdkman/bin/sdkman-init.sh" ]] && source "/usr/local/sdkman/bin/sdkman-init.sh"

They should have instant access to shared gradle after next login, test it with gradle -v


I had the same error, I just moved into the candidates directory and used chmod.

(xenial)lerie@localhost:~/.sdkman/candidates$ sudo chmod u+x -R .(xenial)lerie@localhost:~/.sdkman/candidates$ gradleWelcome to Gradle 7.0!Here are the highlights of this release: - File system watching enabled by default - Support for running with and building Java 16 projects - Native support for Apple Silicon processors - Dependency catalog feature previewFor more details see https://docs.gradle.org/7.0/release-notes.htmlStarting a Gradle Daemon (subsequent builds will be faster)> Starting Daemon