Skip to content

Instantly share code, notes, and snippets.

@1solation
Created June 20, 2023 09:38
Show Gist options
  • Save 1solation/3dbff415b71ecd3bd71591a305640975 to your computer and use it in GitHub Desktop.
Save 1solation/3dbff415b71ecd3bd71591a305640975 to your computer and use it in GitHub Desktop.
asdf install java plugin

First add the plugin for Java

asdf plugin-add java

List available versions

asdf list-all java

Install a version, 17.0.6 given as an example

asdf install java adoptopenjdk-17.0.6+10

You can also select a global version with

asdf global java adoptopenjdk-17.0.6+10

To set JAVA_HOME environment variable for Zsh initialisation, add the following to your .zshrc

. ~/.asdf/plugins/java/set-java-home.zsh

See asdf-java docs for more https://github.com/halcyon/asdf-java#java_home

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment