Как установить jdk на linux mint
This topic describes the installation procedures of the JDK on the Linux platform, along with the system requirements.
General Notes About Installing the JDK on Linux Platforms
This topic describes general information about installing JDK 19 on Linux platforms.
Installing the JDK automatically creates a directory called jdk– <FEATURE> where <FEATURE> is the feature release number.
If you install JDK in a specific location such as /usr/jdk , then you must log in with root credentials to gain the necessary permissions. If you do not have the root access, then either install the JDK in your home directory or a subdirectory for which you have the write permissions.
You can install only version of JDK of the same feature release. If you try to install newer version of the same feature family while older version exists, the installer uninstalls the older version and install the new version.
By default, the installation script configures the system such that the backing store for system preferences is created inside the JDK installation directory as applicable. If the JDK is installed on a network-mounted drive, then the system preferences can be exported for sharing with Java runtime environments on other machines.
System Requirements for Installing JDK on Linux Platforms
See Oracle JDK Certified Systems Configurations for information about supported platforms, operating systems, and browsers.
JDK Installation Instruction Notation for Linux Platforms
JDK installers now support only one version of any Java feature release. You can’t install multiple versions of the same feature release.
If you install an older version of a JDK when the newer version of the same feature family already exists, an error is displayed, prompting you to uninstall a newer JDK version if an older version has to be installed.
Linux x64 systems: jdk- <FEATURE> _linux-x64_bin.tar.gz
Linux aarch64 (64-bit ARM) systems: jdk- <FEATURE> _linux-aarch64_bin.tar.gz
Installing the JDK on Linux from Archive Files and RPM Packages
You can install the Java Development Kit (JDK) on a Linux platform from archive files or from Red Hat Package Manager (RPM) packages.
Installation can be performed by using one of the following processes:
From archive files ( .tar.gz ): This allows you to install a private version of the JDK for the current user into any location, without affecting other JDK installations. However, it may involve manual steps to get some of the features to work. See the following table for the options available for downloading and installing the JDK from archive files. The bundles are available for Linux x64 and Linux aarch64 (64-bit ARM) systems. Install the required bundle.
From RPM packages ( .rpm ): This allows you to perform a systemwide installation of the JDK for all users, and requires root access. See the following table for the options available for downloading and installing the JDK from Linux x64 and Linux aarch64 (64-bit ARM) RPM packages.
Downloading the JDK Installer
Access Java SE Downloads page and click Accept License Agreement . Under the Download menu, click the Download link corresponding your requirement.
The following table lists the options and instructions for downloading and installing the JDK 19 release on a Linux platform:
| Download File | Instructions | Architecture (CPU Type) | Who Can Install |
|---|---|---|---|
| For Linux x64 systems: jdk- <FEATURE> _linux-x64.tar.gz | Installing the 64-Bit JDK on Linux Platforms | Intel — 64-bit | Anyone |
| For Linux aarch64 (64-bit ARM) systems: jdk- <FEATURE> _linux-aarch64.tar.gz | Installing the 64-Bit JDK on Linux Platforms | ARM — 64-bit | Anyone |
| For Linux x64 systems: jdk- <FEATURE> _linux-x64.rpm | Installing the 64-Bit JDK on RPM-Based Linux Platforms | Intel — 64-bit RPM-based Linux | Root |
| For Linux aarch64 (64-bit ARM) systems: jdk- <FEATURE> _linux-aarch64.rpm | Installing the 64-Bit JDK on RPM-Based Linux Platforms | ARM — 64-bit RPM-based Linux | Root |
Installing the 64-Bit JDK on Linux Platforms
You can install the JDK for 64-bit Linux from an archive file ( .tar.gz ). The .tar.gz archive file (also called a tarball) is a file that can be uncompressed and extracted in a single step.
- Download the required file:
- For Linux x64 systems: jdk- <FEATURE> _linux-x64_bin.tar.gz
- For Linux aarch64 (64-bit ARM) systems: jdk- <FEATURE> _linux-aarch64_bin.tar.gz
Before you download a file, you must accept the license agreement. Anyone (not only root users) can install the archive file in any location having write access.
$ tar zxvf jdk- <FEATURE> _linux-x64_bin.tar.gz
$ tar zxvf jdk- <FEATURE> _linux-aarch64_bin.tar.gz
The Java Development Kit files are installed in a directory called jdk- <FEATURE> .
Installing the 64-Bit JDK on RPM-Based Linux Platforms
You can install the JDK on 64-bit RPM-based Linux platforms, such as Oracle, Red Hat, and SuSE by using an RPM binary file ( .rpm ) in the system location.
- Download the required file:
- For x64 systems: jdk- <FEATURE> _linux-x64_bin.rpm
- For aarch64 (64-bit ARM) systems: jdk- <FEATURE> _linux-aarch64_bin.rpm
Before you download a file, you must accept the license agreement.
$ rpm -ivh jdk- <FEATURE> _linux-x64_bin.rpm
$ rpm -ivh jdk- <FEATURE> _linux-aarch64_bin.rpm
JDK 19 can coexist with earlier versions of JDK. For each version, a new directory is created, the default directory being /usr/java/jdk- <FEATURE> .
Upgrade the required package using the following command:
$ rpm -Uvh jdk- <FEATURE> _linux-x64_bin.rpm
$ rpm -Uvh jdk- <FEATURE> _linux-aarch64_bin.rpm
The JDK installation is integrated with the alternatives framework. After installation, the alternatives framework is updated to reflect the binaries from the recently installed JDK. Java commands such as java , javac , javadoc , and javap can be called from the command line.
Using the java -version command, users can confirm the default (recently installed) JDK version.
In addition, you can check which specific RPM package provides the java files:
Sorry, you have been blocked
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
Cloudflare Ray ID: 7a292d2d3c0224aa • Your IP: Click to reveal 88.135.219.175 • Performance & security by Cloudflare
Как установить Java на Linux Mint 20
В этом руководстве мы покажем вам, как установить Java на Linux Mint 20. Для тех из вас, кто не знал, Java — очень популярный язык, когда дело касается программирования. Это общий язык для разработки Android и других корпоративных решений. Впервые он был выпущен Sun Microsystems в 1995 году. Для работы многих программ и сценариев требуется Java, но обычно Java не устанавливается по умолчанию на VPS или выделенный сервер.
Есть две основные реализации Java.
- Oracle Java — для этого требуется коммерческая лицензия, поскольку она предназначена для корпоративных клиентов, которые ценят стабильность и долгосрочную поддержку.
- OpenJDK — это бесплатная реализация платформы Java Standard Edition с открытым исходным кодом.
Просто веселое видео для отвлечения и расслабления в течение 2 минут
В этой статье предполагается, что у вас есть хотя бы базовые знания Linux, вы знаете, как использовать оболочку, и, что наиболее важно, вы размещаете свой сайт на собственном VPS. Установка довольно проста и предполагает, что вы работаете с учетной записью root, в противном случае вам может потребоваться добавить ‘ sudo ‘ к командам для получения привилегий root. Я покажу вам пошаговую установку Java на Linux Mint 20 (Ульяна).
Установить Java на Linux Mint 20 Ulyana
Шаг 1. Перед запуском приведенного ниже руководства важно убедиться, что ваша система обновлена, выполнив следующие apt команды в терминале:
Шаг 2. Установка Java на Linux Mint 20.
Выполните следующую команду, чтобы установить OpenJDK в системе Linux Mint:
Вы также можете выбрать конкретную версию, минуя номер версии в имени пакета:
После успешной установки JDK мы можем проверить правильность установки Java с помощью команды:
Шаг 3. Выбор версии Java по умолчанию в Linux Mint 20.
Вы также можете изменить версию Java по умолчанию и варианты обновления в вашей системе, введя следующую команду:
В моем примере я перехожу на Java 11:
Подтвердите новую версию Java по умолчанию:
Поздравляю! Вы успешно установили Java . Благодарим за использование этого руководства для установки последней версии Java в системе Linux Mint. Для получения дополнительной помощи или полезной информации мы рекомендуем вам посетить официальный веб-сайт Java .
How to Install Java in Linux Mint 20.3
You can install Java in your Linux Mint 20.3 system in just three simple steps that are explained in the following:
Step 1: Install the Java Development Kit
First, you need to install the Java Development Kit (JDK) on your system with the command that follows:

Step 2: Install the Java Runtime Environment
Now, you can also install the Java Runtime Environment (JRE) by executing the following command:

Step 3: Check the Installed Version of Java
Once both the JDK and JRE are installed successfully in your Linux Mint 20.3 system, you can confirm the Java installation by checking its version with the following command:

The following image confirms the installation of Java in our Linux Mint 20.3 system:

Conclusion
By following the three simple steps explained, you can quickly install the Java programming language in your Linux Mint 20.3 system and start coding with this high level programming language right away.
About the author

Karim Buzdar
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.