0

i have done this :

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-8-oracle/bin/javac" 1

and this:

sudo update-alternatives --config javac

also this:

cd /var/lib/dpkg/info

sudo sed -i 's|JAVA_VERSION=8u151|JAVA_VERSION=8u162|' oracle-java8-installer.*
sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|' oracle-java8-installer.*
sudo sed -i 's|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|SHA256SUM_TGZ="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"|' oracle-java8-installer.*
sudo sed -i 's|J_DIR=jdk1.8.0_151|J_DIR=jdk1.8.0_162|' oracle-java8-installer.*

after i copied the source files to

/usr/lib/jvm/java-8-oracle

but still whenever i use apt-get it tries to download 8u151 version which runs into error. how can i, simply put, make it understand that its already installed?!

Socrates
  • 101

1 Answers1

0

What about just removing the package oracle-java8-installer? since you have installed it manually, you don't need it. sudo apt purge oracle-java8-installer should do the trick.

  • i needed to do this manually or i would ignore this in the first place! – Socrates Feb 16 '18 at 23:26
  • I'm following you, what I mean is given the fact that you have installed Java 8 manually, you don't need the package oracle-java8-installer anymore, so you could just remove that package and problem solved. – Fran Marzoa Feb 18 '18 at 12:45