snippetbashTip
jenv — Manage the `$JAVA_HOME` environment variable. More information: <https://github.com/jenv/jenv>.
Viewed 0 times
thejenvcommandclimanageenvironmentvariablejava_home
Problem
How to use the
jenv command: Manage the $JAVA_HOME environment variable. More information: <https://github.com/jenv/jenv>.Solution
jenv — Manage the $JAVA_HOME environment variable. More information: <https://github.com/jenv/jenv>.Add a Java version to jEnv:
jenv add {{path/to/jdk_home}}Display the current JDK version used:
jenv versionDisplay all managed JDKs:
jenv versionsSet the global JDK version:
jenv global {{java_version}}Set the JDK version for the current shell session:
jenv shell {{java_version}}Enable a jEnv plugin:
jenv enable-plugin {{plugin_name}}Code Snippets
Add a Java version to jEnv
jenv add {{path/to/jdk_home}}Display the current JDK version used
jenv versionDisplay all managed JDKs
jenv versionsSet the global JDK version
jenv global {{java_version}}Set the JDK version for the current shell session
jenv shell {{java_version}}Context
tldr-pages: common/jenv
Revisions (0)
No revisions yet.