I was following sudo apt-get update
to add the java 8 repo to apt-get
$ sudo add-apt-repository ppa:webupd8team/java
Again update the apt-get repo
$ sudo apt-get update
Finally install java 8
$ sudo apt-get install oracle-java8-installer
but I had a lot of errors, so I fixed and reinstalled them, but now it shows this image:
ho@jhost:~$ sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
so I want to know java version is 8
ho@jhost:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.8.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
I need a solution to install oracle-java8
Best Answer
You can select the system wide java default executable via update-alternatives. Run the
update-alternatives
command with--list
option to see the currently installed alternatives:Than change the default to your required java version with:
and follow the instruction on the screen.