mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
34 lines
579 B
Plaintext
34 lines
579 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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}}`
|