Sunday, February 19, 2017

Adding Oracle's JDK to Ubuntu 14.04

1) Download JDK, and install it into any directory of your choice, mine was /home/byorn/Programs/java/

2) sudo update-alternatives --install "/usr/bin/java" "java"  "/home/byorn/Programs/java/jdk1.7.0_21/bin/java" 1


3) sudo update-alternatives --config java

and select your option.
To Test type:  java -version

1 comment:

  1. I ran into this problem, and had to install the lib http://askubuntu.com/questions/634024/bash-usr-bin-java-no-such-file-or-directory

    ReplyDelete