Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Latest commit

 

History

History
15 lines (8 loc) · 436 Bytes

Changing_Java_Version.md

File metadata and controls

15 lines (8 loc) · 436 Bytes
  1. sudo apt install openjdk-8-jdk

  2. remove old symlik to /usr/bin/java -> old java location

sudo rm -rf /usr/bin/java

  1. create new symlink to new java location

sudo ln -s /usr/lib/jvm/java-8-openjdk-amd64/ /usr/bin/java

  1. add /usr/bin/java to $PATH in ~/.zshrc, it would have been removed when you deleted /usr/bin/java

  2. source ~/.zshrc

  3. sudo update-alternatives --config java select version