Как обновить jdk linux

Как обновить jdk linux

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 18 on Linux platforms.

Installing the JDK automatically creates a directory called jdk– 18 . interim.update.patch .

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.

If you install the software in a directory that contains a subdirectory named jdk– 18 . interim.update.patch , then the new software overwrites files of the same name in that directory. Ensure that you rename the old directory if it contains files that you would like to keep.

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

Instructions for installing JDK contains a version notation that represents the Feature, Interim, and Update version information.

For example, if you are installing JDK 18 Interim 0, Update 0, and Patch 0, then the following string represents the name of the bundle:

Linux x64 systems: jdk- 18 . interim.update.patch _linux-x64_bin.tar.gz

Linux aarch64 (64-bit ARM) systems: jdk- 18 . interim.update.patch _linux-aarch64_bin.tar.gz

If a component has 0 as the suffix, it will be excluded.

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.

READ  Как сделать образ linux для восстановления

The following table lists the options and instructions for downloading and installing the JDK 18 release on a Linux platform:

Download File Instructions Architecture (CPU Type) Who Can Install
For Linux x64 systems: jdk- 18 . interim.update.patch _linux-x64.tar.gz Installing the 64-Bit JDK on Linux Platforms Intel — 64-bit Anyone
For Linux aarch64 (64-bit ARM) systems: jdk- 18 . interim.update.patch _linux-aarch64.tar.gz Installing the 64-Bit JDK on Linux Platforms ARM — 64-bit Anyone
For Linux x64 systems: jdk- 18 . interim.update.patch _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- 18 . interim.update.patch _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.

  • For Linux x64 systems: jdk- 18 . interim.update.patch _linux-x64_bin.tar.gz
  • For Linux aarch64 (64-bit ARM) systems: jdk- 18 . interim.update.patch _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- 18 . interim.update.patch _linux-x64_bin.tar.gz

$ tar zxvf jdk- 18 . interim.update.patch _linux-aarch64_bin.tar.gz

The Java Development Kit files are installed in a directory called jdk- 18 . interim.update.patch .

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.

  • For x64 systems: jdk- 18 . interim.update.patch _linux-x64_bin.rpm
  • For aarch64 (64-bit ARM) systems: jdk- 18 . interim.update.patch _linux-aarch64_bin.rpm

Before you download a file, you must accept the license agreement.

$ rpm -ivh jdk- 18 . interim.update.patch _linux-x64_bin.rpm

$ rpm -ivh jdk- 18 . interim.update.patch _linux-aarch64_bin.rpm

JDK 18 can coexist with earlier versions of JDK. For each version, a new directory is created, the default directory being /usr/java/jdk- 18 . interim.update.patch .

Upgrade the required package using the following command:

$ rpm -Uvh jdk- 18 . interim.update.patch _linux-x64_bin.rpm

$ rpm -Uvh jdk- 18 . interim.update.patch _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, users can check which specific RPM package provides the java files:

Источник

Java для Linux – загрузка и установка всех версий

Часто пользователь хочет запустить в Linux программу, написанную на Java, но в результате получает кучу ошибок. Причина этому – отсутствие некоторых программных пакетов, которые нужны для корректной работы языка программирования. В статье расскажем, как правильно установить Java в Linux.

Возможности Java

Java – популярный язык программирования. На нем разработано тысячи приложений.

Чтобы Джава корректно работала в ОС Linux, следует инсталлировать два программных модуля – JRE и JDK.

Предназначение:

  • JRE – среда, позволяющая запускать программные продукты, которые написаны на языке Java.
  • JDK – пакет, предназначенный для создания программ. В модуль входят компилятор, документация по языку, библиотека стандартных классов и т. д.

Пакеты JRE и JDK в первую очередь понадобятся тем, кто решил разработать собственное ПО. Также язык Джава будет полезен рядовым пользователям. Ведь программные продукты, написанные на рассматриваемом ЯП, попросту не запускаются без установленных пакетов Runtime Environment и Development Kit (к примеру, Майнкрафт).

Системные требования

Системные требования зависят от версии программных пакетов. К примеру, Джава 8 работает на Ubuntu 12.04 и выше. А 7-я модификация программного обеспечения от Oracle поддерживается версией Убунту 10.04 и ниже.

Минимальные требования:

Операционная система Linux: Oracle, Red Hat Enterprise,
Suse Enterprise Server, Ubuntu
Браузер Firefox 3.6 и выше

Скачать Java

Скачать все версии Java для Linux можно на официальном сайте компании Oracle.

Программные пакеты Runtime Environment и Development Kit распространяются по свободной лицензии. А это значит, что скачать их на Linux можно бесплатно.

На сайте представлено 4 установочных файла:

  • Линукс RPM – модификация с поддержкой RPM для 32-разрядной системы;
  • Линукс – модификация для 32-разрядной системы;
  • Линукс x64 – модификация для 64-разрядной системы;
  • Линукс x64 RPM – модификация с поддержкой RPM для 64-разрядной системы.

Инструкция по установке на Linux

В операционной системе Linux установка Java не займет много времени. ПО можно инсталлировать, прописав в терминале пару команд.

  1. Перейдите в директорию, в которую нужно инсталлировать программу. Для этого используйте команду cd.
  2. Переместите скачанный архив в текущую директорию.
  3. Распакуйте архив, используя команду tar zxvf имя_файла. После завершения модули Runtime Environment и Development Kit инсталлируются в автоматическом режиме.

Процесс установки Джавы на базе RPM немного отличается:

  1. Перейдите в режим рут-пользователя. Для этого задействуйте команду su и после этого укажите пароль от учетной записи с особыми правами.
  2. Удалите из системы ранние версии Джавы. Задействуйте команду rpm с параметром -e. Устанавливать утилиту rpm нужно отдельно.
  3. Перейдите в директорию, в которую нужно установить программу. Для этого используйте команду cd.
  4. Распакуйте архив командой rpm с параметром -ivh. После завершения модули JRE и JDK инсталлируются в автоматическом режиме.

Как обновить Java на Linux

Чтобы иметь на компьютере последнюю модификацию JDK и JRE, регулярно обновляйте программные пакеты. Последняя версия Джавы доступна на нашем сайте.

Стоит отметить, что системой предусмотрено автоматическое обновление JDK и JRE. Однако можно инсталлировать последнюю версию Джавы вручную:

  1. Скачайте архив с новой версией Джавы. Используя запись пользователя с особыми правами, скопируйте загруженный файл в папку Java. Она лежит в директории local, которая расположена в папке use.
  2. Разархивируйте файл. Сей процесс уже был описан выше.
  3. Отредактируйте системный файл под названием profile. Он находится в директории etc. В конце файла отредактируйте переменные среды (JAVA_HOME и JRE_HOME). Поменяйте номер версии со старого на новый.

Источник

Как обновить jdk linux

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 11 on Linux platforms.

Installing the JDK automatically creates a directory called jdk– 11 . interim.update.patch .

If you install Java SE Runtime Environment in a specific location such as /usr/jdk (for JDK) then you must log in with root credentials to gain the necessary permissions. If you do not have root access, then either install the Java SE Runtime Environment in your home directory or a subdirectory for which you have write permissions.

If you install the software in a directory that contains a subdirectory named jdk– 11 . interim.update.patch , then the new software overwrites files of the same name in that directory. Ensure that you rename the old directory if it contains files that you would like to keep.

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

Instructions for installing JDK contains a version notation that represents the Feature, Interim, and Update version information.

For example, if you are installing JDK 11 Interim 0, Update 0, and Patch 0, then the following string represents the name of the bundle:

Linux x64 systems: jdk- 11 . interim.update.patch _linux-x64_bin.tar.gz

Linux aarch64 (64-bit ARM) systems: jdk- 11 . interim.update.patch _linux-aarch64_bin.tar.gz

If a component has 0 as the suffix, it will be excluded.

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 11 release on a Linux platform:

Download File Instructions Architecture (CPU Type) Who Can Install
For Linux x64 systems: jdk- 11 . interim.update.patch _linux-x64.tar.gz Installing the 64-Bit JDK 11 on Linux Platforms Intel — 64-bit Anyone
For Linux aarch64 (64-bit ARM) systems: jdk- 11 . interim.update.patch _linux-aarch64.tar.gz Installing the 64-Bit JDK 11 on Linux Platforms ARM — 64-bit Anyone
For Linux x64 systems: jdk- 11 . interim.update.patch _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- 11 . interim.update.patch _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 11 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.

  • For Linux x64 systems: jdk- 11 . interim.update.patch _linux-x64_bin.tar.gz
  • For Linux aarch64 (64-bit ARM) systems: jdk- 11 . interim.update.patch _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- 11 . interim.update.patch _linux-x64_bin.tar.gz

$ tar zxvf jdk- 11 . interim.update.patch _linux-aarch64_bin.tar.gz

The Java Development Kit files are installed in a directory called jdk- 11 . interim.update.patch .

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.

  • For x64 systems: jdk- 11 . interim.update.patch _linux-x64_bin.rpm
  • For aarch64 (64-bit ARM) systems: jdk- 11 . interim.update.patch _linux-aarch64_bin.rpm

Before you download a file, you must accept the license agreement.

$ rpm -ivh jdk- 11 . interim.update.patch _linux-x64_bin.rpm

$ rpm -ivh jdk- 11 . interim.update.patch _linux-aarch64_bin.rpm

JDK 11 can coexist with earlier versions of JDK. For each version, a new directory is created, the default directory being /usr/java/jdk- 11 . interim.update.patch .

Upgrade the required package using the following command:

$ rpm -Uvh jdk- 11 . interim.update.patch _linux-x64_bin.rpm

$ rpm -Uvh jdk- 11 . interim.update.patch _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, users can check which specific RPM package provides the java files:

Источник

READ  Как поменять имя блютуз windows 10