HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

jenv — Manage the `$JAVA_HOME` environment variable. More information: <https://github.com/jenv/jenv>.

Submitted by: @import:tldr-pages··
0
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 version


Display all managed JDKs:
jenv versions


Set 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 version

Display all managed JDKs

jenv versions

Set 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.