Sunday, February 5, 2017

JAVA_HOME error /usr/lib/jvm

Two days ago I upgraded from Ubuntu LTS 12.04 to 14.04 and then again to 16.04 Xenial

To see what version you have installed run this:
lsb_release -a

Output on my machine
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04

Codename: xenial

During the upgrade(s) Java was updated and the $JAVA_HOME value had to be changed in my profile.

Replace the old value of $JAVA_HOME (end of file, usually) with the "link best version is " value from running this:
readlink -f $(which java)

which was /usr/lib/jvm/java-8-oracle/jre/bin/java

Now using nano or gedit open up /etc/profile with admin rights. Update JAVA_HOME="old/value" to JAVA_HOME="/usr/lib/jvm/java-8-oracle" (in my case). Yes, exclude  everything after "oracle".

Log out and you're done. Error upon booting up should disappear

Any complications? drop me  a line.

No comments:

Post a Comment