Skip to content

Instantly share code, notes, and snippets.

@bjing
Created September 6, 2023 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjing/eeef40fe8ee1cc8c6e728c35904c32db to your computer and use it in GitHub Desktop.
Save bjing/eeef40fe8ee1cc8c6e728c35904c32db to your computer and use it in GitHub Desktop.
Scala dev environment (Linux)
# Java
## Install java
Install latest LTS version from OS package manager, e.g.
```
sudo apt install openjdk-17-jdk
```
## Jenv (for managing java version)
### Install
```sh
git clone https://github.com/jenv/jenv.git ~/.jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(jenv init -)"' >> ~/.bash_profile
```
### Post-install
```sh
# Add java to jenv
jenv add <absolute path of java home>
# set global java version
jenv global <java version>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment