Installing Java 8

New to Debian (Or Linux in general)? Ask your questions here!

Installing Java 8

Postby consume555 » 2020-04-30 19:30

Hi,

I am currently trying to install java 8 on Debian buster. At the moment, I've tried digital ocean, stack overflow, webupt8, and more in order to try to get it to work, but none of the automatic installers from webupt8 have been working. its not a key error, i fixed that. its not a OS error (i believe), its a fresh install. the issue is, despite having the repository, apt tells me that
"Reading package lists... Done
Building dependency tree
Reading state information... Done
Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'oracle-java8-installer' has no installation candidate
"
and from apt-get update, i get
"Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Ign:5 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster InRelease
Hit:6 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster Release
Ign:7 http://ppa.launchpad.net/webupd8team/java/ubuntu groovy InRelease
Ign:8 http://ppa.launchpad.net/webupd8team/y- ... ger/ubuntu groovy InRelease
Err:10 http://ppa.launchpad.net/webupd8team/java/ubuntu groovy Release
404 Not Found [IP: 2001:67c:1560:8008::15 80]
Err:11 http://ppa.launchpad.net/webupd8team/y- ... ger/ubuntu groovy Release
404 Not Found [IP: 2001:67c:1560:8008::15 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details."
I cannot tell what is the issue, and neither can my friends. I even went and deleted the file "webupd8team-java.list" to try and see if it would do anything, but it managed to accomplish absolutely nothing. ill try my best to reply quickly.
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby Bulkley » 2020-04-30 20:12

Debian and Ubuntu files don't mix. You have a mess. You might as well reinstall. Pick one or the other but not both.
Bulkley
 
Posts: 6003
Joined: 2006-02-11 18:35

Re: Installing Java 8

Postby consume555 » 2020-04-30 20:16

well, that is what any online articles said i should do for Debian. So, how do I install java 8 then?
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby arochester » 2020-04-30 20:26

any online articles said
What articles? Not every thing you read on the Internet is correct.
arochester
 
Posts: 1744
Joined: 2010-12-07 19:55

Re: Installing Java 8

Postby Head_on_a_Stick » 2020-04-30 20:30

consume555 wrote:how do I install java 8 then?

https://docs.oracle.com/javase/8/docs/t ... l#A1097144
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12650
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Installing Java 8

Postby consume555 » 2020-05-01 00:52

to the question
what articles
i went to places like digital ocean, askUbuntu(probably the wort option for this), https://stackoverflow.com/questions/570 ... -10-buster, https://docs.datastax.com/en/jdk-instal ... dkDeb.html, https://tecadmin.net/install-java-8-on-debian/.
even some of the Debian specific resources had Ubuntu repositories in them.
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby consume555 » 2020-05-01 01:08

OK, so i just tried using the oracle website to install java. it had me use the tar command to unzip a tar file into the same folder it was in, and now i have whatever unzipped output of it on my desktop. It said to now put it in any install directory you choose, but I'm still fairy new to the Linux filesystem, and don't know there i should put a file like this. where should i put it and how do I use it?
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby cuckooflew » 2020-05-01 02:50

Why don't you just install it with 'apt', from the Debian repositories as instructed here ?https://wiki.debian.org/Java/
Code: Select all
apt-get install default-jre

==================
Code: Select all
apt-get install default-jdk

=====================

If you are referring to this :
Change directory to the location where you would like the JDK to be installed, then move the .tar.gz archive binary to the current directory.

You would first make a directory where you want to have this,
Code: Select all
$mkdir /home/username/myjava
(where I say "myjava" could be any name you want,
where should i put it and how do I use it?

Are you serious, ? you don't seriously expect us to hold your hand and write a step by step tutorial on using it, or do you ? the Oracle website should have documentation on using their own software, try reading it first.
===================
Bulkley wrote:Debian and Ubuntu files don't mix. You have a mess. You might as well reinstall. Pick one or the other but not both.

You have all ready totally messed up your system, it is no longer Debian, you should straighten out that mess before you install anything, yes just re-install Debian would be the easiest way.
Please read: https://wiki.debian.org/DontBreakDebian
Repositories that can create a FrankenDebian if used with Debian Stable:

Debian testing release (currently bullseye)

Debian unstable release (also known as sid)

Ubuntu, Mint or other derivative repositories are not compatible with Debian!
Ubuntu PPAs

=======================
Before reinstalling your system, please read some of the Debian documentation, at the Debian.org website, and on the wiki,...
but I'm still fairy new to the Linux filesystem,

No excuse, there is a lot of good documentation available, but yes,
arochester wrote:
any online articles said
What articles? Not every thing you read on the Internet is correct.

I also agree with this, sadly it is true, so it is fine to ask here first, before following bad advice, like you did , so anyway, here is a couple of good starting points:
https://www.debian.org/doc/manuals/user/ch-files.html
This is obsolete, but it actually still has a lot of info/ commands that still applies,....
a newer more current one,:
https://www.cyberciti.biz/tips/understanding-unixlinux-file-system-part-i.html
At least at a glance it looks ok, someone else might know of something better.
Additional: https://wiki.debian.org/FileSystem (I don't think it is what you are in need of now, but maybe later)
==== off topic comment , but can't resist:
r/ubuntu groovy Release'

Ubuntuers are so funny, they must be a bunch old burned out hippies,... most of the real "beatniks" have all died, but Hey man, that's kool daddy,and sooo groovy , I mean like wow,... hey pass the joing daddyo, cool daddy, groovy , soo groovy. Any way, that's cool, you know what I mean ?
---------------------------------------------------------------------------------------------------------------
@OP, sorry if my sense of humor does not make sense or offends, I don't mean to offend, just having fun,enjoying these last days, so have a good day and Be Kool, Be happy., and groovy as well,... :mrgreen:
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: Installing Java 8

Postby cuckooflew » 2020-05-01 03:08

how do I use it?

https://www.debian.org/doc/manuals/debian-java-faq/
and
https://www.debian.org/doc/packaging-manuals/java-policy/
==============
https://www.debian.org/doc/manuals/debian-java-faq/ch1.en.html#s1.4
***********************************************************************************
https://www.debian.org/doc/manuals/debian-java-faq/ch4.en.html#s4.5
4.5 How can I use the proprietary version of the JDK/JRE from Oracle as a Debian package?

The package java-package provides an easy way to convert an upstream installer into a Debian package. It should be as easy as:

make-jpkg ~/Downloads/jdk-6u31-linux-x64.bin

For more information, see this Blog article

**************************************************************************************
Maybe :
https://www.i-programmer.info/ebooks/modern-java/1376-getting-started-with-java.html
This should be enough hand holding to help you get started walking.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: Installing Java 8

Postby stevepusser » 2020-05-01 03:51

Do you really need the Oracle version, or is the openjdk-8 version that is in the Stretch repos sufficient? Cuz that's been ported to a Buster base for MX 19: http://mxrepo.com/mx/testrepo/pool/test/o/openjdk-8/

Shoot, I got the sources from another guy's personal repo--was it the WTF repo? https://www.mirbsd.org/~tg/Debs/debidx.htm
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12078
Joined: 2009-10-06 05:53

Re: Installing Java 8

Postby consume555 » 2020-05-01 04:36

Thank you everyone who responded to my post! I am going to give it a try.
CuckooFlew made a good point about me expecting to have you guys hold my hand though the process, but that is not my intension and I'm sorry if I came off that way. I really appreciate the super fast responses and amazing help that was provided here, as at the moment I'm trying to setup a Minecraft server for my friends and I. I had actually spent about six hours troubleshooting before I came to this forum, and I still am uncomfortable using it as I only switched to Linux about a year ago, and have been trying to learn the ropes since then. I am going to make an effort to fully read through documentaion now for the purposes I am using this machine.

thank you all so much, It really means a lot to me.
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby cuckooflew » 2020-05-01 05:13

your welcome,
also, I did not think to mention, if you did not actually install any of the Ubuntu and ppa packages yet, since it failed, maybe no harm is done, just remove all of the non debian sources from your /etc/apt/sources.list file, you might not need to re-install the entire OS. If you do not know about that see this :
https://wiki.debian.org/SourcesList
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: Installing Java 8

Postby consume555 » 2020-05-01 05:42

I actually just finished reinstalling, but thanks again!
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby consume555 » 2020-05-01 06:35

Ok, sorry if I'm asking too much, but I just tried to install openjdk-8-jre using the command
Code: Select all
sudo apt-get install openjdk-8-jdk
, and I got the error
Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package openjdk-8-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'openjdk-8-jre' has no installation candidate

so I tried adding the repository using this
Code: Select all
sudo add-apt-repository ppa:openjdk-r/ppa
, but I get this error out of it;
Code: Select all
add-apt-repository: command not found

So then I tried installing it using
Code: Select all
sudo apt-get install software-properties-common
, but then I got the error
Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 openjdk-8-dbg : Depends: openjdk-8-jre-headless (= 8u222-b10-1~mx19+1) but it is not installable
                 Recommends: openjdk-8-jre (= 8u222-b10-1~mx19+1) but it is not installable
 software-properties-common : Depends: python3-software-properties (= 0.96.20.2-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

so then I tried the commands
Code: Select all
sudo apt-get update
and
Code: Select all
sudo apt-get upgrade
because I googled the error and got a reddit post saying that this would fix it, but then when I used the command
Code: Select all
sudo apt-get upgrade
, It tells me once again;
Code: Select all
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 openjdk-8-dbg : Depends: openjdk-8-jre-headless (= 8u222-b10-1~mx19+1) but it is not installable
                 Recommends: openjdk-8-jre (= 8u222-b10-1~mx19+1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

so now I don't know what to do, and I'm sorry if there is some documentation that I've been missing, but I don't know what to do next. just directing me to some documentation would be nice.
consume555
 
Posts: 7
Joined: 2020-04-30 19:13

Re: Installing Java 8

Postby Head_on_a_Stick » 2020-05-01 09:27

@OP: don't use PPAs, they carry a risk of completely breaking your system. All of those "guides" on the interweb are full of shit.

Have you tried stevepusser's forward-port from stretch? That should work but then you won't be able to install the native buster Java version, which is why I linked the Oracle instructions — they allow version 8 to co-exist with the repository version.

consume555 wrote:OK, so i just tried using the oracle website to install java. it had me use the tar command to unzip a tar file into the same folder it was in, and now i have whatever unzipped output of it on my desktop. It said to now put it in any install directory you choose, but I'm still fairy new to the Linux filesystem, and don't know there i should put a file like this. where should i put it and how do I use it?

Probably best to place the files under the /usr/local/ hierarchy so that they don't conflict with installed packages.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12650
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable