This commit is contained in:
nm1 2026-11-04 00:33:23 +05:30
commit 74ae93a96e

View file

@ -0,0 +1,29 @@
jenv
https://github.com/jenv/jenv
https://www.youtube.com/watch?v=9FVZyeFDXo0
its a java version manager like nvm which alters the environment path
- Installation
```bash
git clone https://github.com/jenv/jenv.git ~/.jenv
# Shell: bash
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(jenv init -)"' >> ~/.bash_profile
# Shell: zsh
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc
```
Here instead of `~/.bash_profile` it can be `~/.bashrc` too
- Configurations
Check installed versons using `jenv versions` .
To add java to jenv use
`jenv add /usr/lib/jvm/java-11-openjdk`
- Using
To set version locally for current directory
`jenv local 11.0.2`
For globally
`jenv global 11.0.2`