Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save Sanix-Darker/247daa10ab4635f2168b848e8cecb5ac to your computer and use it in GitHub Desktop.
Save Sanix-Darker/247daa10ab4635f2168b848e8cecb5ac to your computer and use it in GitHub Desktop.
[Shell] Install Java JDK 1.8 on Debian, Kali linux
sudo su -
cat >/etc/apt/sources.list.d/webupd8team-java.list<< EOF
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
EOF
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
java -version
@yalcincosar
Copy link

thx

@r1cs3c
Copy link

r1cs3c commented Feb 23, 2018

Thanks, man only instructions that work!

@sawhtetkhine-soe
Copy link

thanks

@AzyCrw4282
Copy link

Thanks man

@nohope91
Copy link

nohope91 commented Jan 3, 2019

BIG THANKS FROM THE HELL T_T
GODDAMN IT ,. OHH FINALLY THAT WORKED !!!!!!
YEAAAAAAAAAAAAAAAAAH ^_^

@issambaccouch
Copy link

thank you so so so so soso much u save my day

@williesmithy420
Copy link

Iam new to kali linux i copied the code from above and sommit happened but when i go into Applications theres nowt about java
iam trying to install java and then hopefully Netbeans please help

@Sanix-Darker
Copy link
Author

@williesmithy420 when you followed instructions and then hit in your CLI :
java -version
What did you get ?

@emilyanncr
Copy link

E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Sigh....

@sproutecks2125
Copy link

@emilyanncr I received the same message:

after apt-get update

E: Repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease' changed its 'Label' value from 'Oracle Java (JDK) 8 Installer PPA' to 'Oracle Java (JDK) 8 Installer PPA (DISCONTINUED)'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

Any ideas?

Trying to install Java 8 on Windows 10 - Linux Sub System (WSL). Have to have JDK8 to run Bless.

@sproutecks2125
Copy link

sproutecks2125 commented Sep 22, 2019

From WebUPD8 Team website:

How To Install Oracle Java 8 In Debian Via Repository [JDK8]

Author: Andrew | Posted: March 20, 2014 | Updated: April 18, 2019
The Oracle JDK License has changed for releases starting April 16, 2019.

The new Oracle Technology Network License Agreement for Oracle Java SE is substantially different from prior Oracle JDK licenses. The new license permits certain uses, such as personal use and development use, at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer be available. Please review the terms carefully before downloading and using this product. An FAQ is available here.

Oracle Java downloads now require logging in to an Oracle account to download Java updates, like the latest Oracle Java 8u211 / Java SE >8u212. Because of this I cannot update the PPA with the latest Java (and the old links were broken by Oracle).

For this reason, THIS PPA IS DISCONTINUED (unless I find some way around this limitation).

So no way to do this now??

@emilyanncr
Copy link

oh yes I found a solution...shit..my memory's foggy on where I found the answer. I know I had to download jre-8u221-linux-x64.tar.gz and do a few other things. I'll try to find the article.

@aadesh2401
Copy link

root@localhost:~# apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package oracle-java8-installer

@wihacker-X1
Copy link

root@localhost:~# apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package oracle-java8-installer

@Sanix-Darker
Copy link
Author

@aadesh2401 and @WiHacker , apt-get update first doesn't help ?

@emilyanncr
Copy link

emilyanncr commented Jun 29, 2021

@aadesh2401 @wihacker-X1 @sproutecks2125 you might have already solved it by now, but if not, check out this new article https://linuxconfig.org/how-to-install-java-on-kali-linux

@Ak4695755
Copy link

Totally was a raw material for me just a waste of time nothing else

@rmpitts94
Copy link

so i am branching off with my work with kali into some new things and as a few others have also gotten, i have as well. nothing online seems to fix this.
apt-get install oracle-java8-installer 1 ⨯
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package oracle-java8-installer

@rmpitts94
Copy link

i cant alt the java version either as obviously its not installing properly. for what im doing i have to use 1.8. no other version will work for it.

@rmpitts94
Copy link

@aadesh2401 and @WiHacker , apt-get update first doesn't help ?

this is what you get:
Hit:1 http://kali.download/kali kali-rolling InRelease
Get:2 https://deb.torproject.org/torproject.org stretch InRelease [3,531 B]
Err:2 https://deb.torproject.org/torproject.org stretch InRelease
The following signatures were invalid: EXPKEYSIG 74A941BA219EC810 deb.torproject.org archive signing key
Hit:3 https://apt.syncthing.net syncthing InRelease
Hit:4 https://packagecloud.io/AtomEditor/atom/any any InRelease
Ign:5 http://ppa.launchpad.net/nginx/stable/ubuntu kinetic InRelease
Err:6 http://ppa.launchpad.net/nginx/stable/ubuntu kinetic Release
404 Not Found [IP: 185.125.190.52 80]

and then everything else in the list:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment