Openjdk for linux mint

Linux Mint Forums

Do these easy step to install OpenJDK 8 and Tomcat 8 on Debian Jessie:

1. Edit /etc/apt/sources.list and add these lines (you may ignore line with #)
# Backport Testing on stable
# JDK 8
deb http://ftp.de.debian.org/debian jessie-backports main

3. # apt-get install openjdk-8-jdk

Is the above advice a good idea? What possible negative consequences could result from steps 1 and 2? Is it possible to mitigate those consequences if they exist?

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

phd21 Level 20
Posts: 10102 Joined: Thu Jan 09, 2014 9:42 pm Location: Florida

Re: Installing OpenJDK8

Post by phd21 » Mon Jul 17, 2017 10:15 am

OpenJDK Java 8 has been in the official Ubuntu repositories and for Linux Mint users, here’s how to install it from PPA.
http://ubuntuhandbook.org/index.php/201 . 12-04-lts/

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get install openjdk-8-jdk

VIP: If you have more than one Java versions installed on your system. Run the command below to set the default Java:

sudo update-alternatives —config java

Type in a number to select a Java version.
And set default Java Compiler by running:

sudo update-alternatives —config javac

4. Finally check out current Java version by running:

It outputs something like this:

openjdk version «1.8.0_01-internal»
OpenJDK Runtime Environment (build 1.8.0_01-internal-b04)
OpenJDK 64-Bit Server VM (build 25.40-b08, mixed mode)

HOW TO INSTALL ORACLE JAVA 8 IN DEBIAN VIA REPOSITORY [JDK8] Updated: February 22, 2017
http://www.webupd8.org/2014/03/how-to-i . ebian.html

How To Install Java with Apt-Get on Debian 8, Updated June 27, 2017
https://www.digitalocean.com/community/ . n-debian-8

FYI: PPA’s also have easy to install Linux deb files. Go to the PPA website, click «view package details» midway down on the right, you’ll see various options to choose from, ,like Ubuntu Xenial 16.04 (Linux Mint 18.x) for newer Debian LMDE system should work, Ubuntu 14.04 (Linux Mint 17.x) for older Debian LMDE systems .

Linux Deb files for newer Linux Mint 18.x (Ubuntu 16.04) or Newer Debian LMDE systems
https://launchpad.net/~openjdk-r/+archi . d/12541603

Phd21 : Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS’s , Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.

Re: Installing OpenJDK8

Post by youstupiddarkness » Mon Jul 17, 2017 6:38 pm

Those instructions are vague. I don’t think that whoever copied them really understands them.

This is the line that needs to be in your software sources (usually /etc/apt/sources.list) test file:

deb http://ftp.de.debian.org/debian jessie-backports main

This is the German mirror, you can change it to a mirror that’s closer to you if you wish.

Читайте также:  Kodi linux or windows

The next two are terminal commands that need to be run with sudo or as root:

apt-get update apt-get install openjdk-8-jdk 

Then set the alternatives the same as with the Ubuntu directions. You can also install and use galternatives to set them in a GUI.

You will see a load of updates available if you leave that jessie-backports repo enabled—it’s best not to install anything that you don’t truly need updated from it, though.

Re: Installing OpenJDK8

Post by 0x2620 » Wed Jul 19, 2017 2:25 am

youstupiddarkness wrote: PPAs won’t help with LMDE.

Those instructions are vague. I don’t think that whoever copied them really understands them.

This is the line that needs to be in your software sources (usually /etc/apt/sources.list) test file:

deb http://ftp.de.debian.org/debian jessie-backports main

This is the German mirror, you can change it to a mirror that’s closer to you if you wish.

The next two are terminal commands that need to be run with sudo or as root:

apt-get update apt-get install openjdk-8-jdk 

Then set the alternatives the same as with the Ubuntu directions. You can also install and use galternatives to set them in a GUI.

You will see a load of updates available if you leave that jessie-backports repo enabled—it’s best not to install anything that you don’t truly need updated from it, though.

So I remove the line in /etc/apt/sources.list once openjdk-8-jdk is installed? How would I update it then? Check periodically?

Is it possible to limit things I download from the aforementioned ftp to this specific package (or any specific package)? Seems for too useful a feature to not exist.

phd21 Level 20
Posts: 10102 Joined: Thu Jan 09, 2014 9:42 pm Location: Florida

Re: Installing OpenJDK8

Post by phd21 » Wed Jul 19, 2017 10:30 am

I updated my last reply with links for installing OpenJDK8 and or Oracle in Debian LMDE systems, see bottom of reply.

Phd21 : Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS’s , Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.

Re: Installing OpenJDK8

Post by 0x2620 » Thu Jul 20, 2017 2:09 am

youstupiddarkness wrote: PPAs won’t help with LMDE.

Those instructions are vague. I don’t think that whoever copied them really understands them.

This is the line that needs to be in your software sources (usually /etc/apt/sources.list) test file:

deb http://ftp.de.debian.org/debian jessie-backports main

This is the German mirror, you can change it to a mirror that’s closer to you if you wish.

The next two are terminal commands that need to be run with sudo or as root:

apt-get update apt-get install openjdk-8-jdk 

Then set the alternatives the same as with the Ubuntu directions. You can also install and use galternatives to set them in a GUI.

You will see a load of updates available if you leave that jessie-backports repo enabled—it’s best not to install anything that you don’t truly need updated from it, though.

person@computer ~ $ sudo apt-get install openjdk-8-jdk Reading package lists. Done Building dependency tree Reading state information. Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: openjdk-8-jdk : Depends: openjdk-8-jre (= 8u131-b11-1~bpo8+1) but it is not going to be installed Depends: openjdk-8-jdk-headless (= 8u131-b11-1~bpo8+1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. person@computer ~ $ sudo apt-get install openjdk-8-jre Reading package lists. Done Building dependency tree Reading state information. Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: openjdk-8-jre : Depends: openjdk-8-jre-headless (= 8u131-b11-1~bpo8+1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. person@computer ~ $ sudo apt-get install openjdk-8-jre-headless Reading package lists. Done Building dependency tree Reading state information. Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed E: Unable to correct problems, you have held broken packages. person@computer ~ $ sudo apt-get install ca-certificates-java Reading package lists. Done Building dependency tree Reading state information. Done ca-certificates-java is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. person@computer ~ $ sudo apt-get install openjdk-8-jre-headless Reading package lists. Done Building dependency tree Reading state information. Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed E: Unable to correct problems, you have held broken packages. 

I updated my last reply with links for installing OpenJDK8 and or Oracle in Debian LMDE systems, see bottom of reply.

person@computer ~/Downloads $ gdebi openjdk-8-jre-headless_8u131-b11-0ubuntu1.16.04.2_amd64.deb Reading package lists. Done Building dependency tree Reading state information. Done Building data structures. Done Building data structures. Done This package is uninstallable Dependency is not satisfiable: libjpeg8 (>= 8c) person@computer ~/Downloads $ gdebi openjdk-8-jre_8u131-b11-0ubuntu1.16.04.2_amd64.deb Reading package lists. Done Building dependency tree Reading state information. Done Building data structures. Done Building data structures. Done This package is uninstallable Dependency is not satisfiable: openjdk-8-jre-headless (= 8u131-b11-0ubuntu1.16.04.2)

Источник

Читайте также:  Команды fdisk в linux

How to Install OpenJDK on Linux Mint 21

Java is a programming language used for the development of Web & Application servers, Android apps, desktop Applications, and games. You can also use Java on your Linux Mint system for the developments of different applications. You can follow the article below to know how to install an open-source Java development kit (JDK) on Linux Mint.

How to Install OpenJDK on Linux Mint 21

To install open-source Java development kit you can use the methods mentioned below:

Installing OpenJDK Through Software Manager – Linux Mint

You can install an open-source java development kit by using the software manager of Linux Mint. To complete the installation, open the software manager, search for jdk, select the latest version as it has various versions available and click on the Install button:

Installing OpenJDK Through Terminal – Linux Mint

You can also install OpenJDK by using the Linux Mint. You can follow the steps mentioned below to install the OpenJDK using terminal:

Step 1: List down all the version of OpenJDK available on the Linux Mint executing the command given below:

Step 2: To install the default version of OpenJDK on your system execute the command mentioned below:

Step 3: You can install a specific version by using the syntax given in the command mentioned below:

For demonstration i have installed the latest version of OpenJDK that is 19 by using the above given syntax:

Step 4: After the successful installation of the OpenJDK you can check its version by running the command mentioned below:

Читайте также:  Linux нет команды systemctl

Step 5: You can set the desired version as default version so to do this first you can list all the OpenJDK versions installed on Linux Mint by running the command mentioned below:

Step 6: Now execute the below command and you will get the option to set the desired version to set as default:

Now enter the respective number of the OpenJDK version you want to set as a default like if want to set OpenJDK 19 as default so I can either enter 3:

How to Uninstall OpenJDK on Linux Mint 21

You can uninstall the OpenJDK by using the following methods:

Through Software Manager

To remove the OpenJDK from your system you can just open software manager, search for OpenJDK and click on button mentioning Remove:

Through Terminal

To remove the OpenJDK from your system using terminal you can execute the command given below:

Conclusion

Java is a famous language used for the development of various kinds of applications. This language is also compatible with Linux Mint and you can install open-source java development kit by using software manager and apt package manager as well by using the guide mentioned in the above article.

About the author

Rafia Amjad

I have a degree in Electronics and love to write. My research and writing emphasize on the most recent innovations in gaming and technology.

Источник

Оцените статью
Adblock
detector