Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. ```sh
  2. # Adding ppa to local repository
  3. sudo add-apt-repository ppa:webupd8team/java
  4. # Updating repository archives
  5. sudo apt update
  6. # Installing Oracle Java8
  7. sudo apt install -y oracle-java8-installer
  8. # Verifying the java installation
  9. javac -version
  10. # Setting Oracle Java8 as default (In case of multiple java versions)
  11. sudo apt install -y oracle-java8-set-default
  12. # Setting up environment variable (Also, add this to the `~/.bashrc` file to apply for next boot)
  13. export JAVA_HOME=/usr/lib/jvm/java-8-oracle
  14. export PATH=$PATH:$JAVA_HOME/bin
  15. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement