Installing jdk bin on linux

Installing jdk bin on 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 from Archive Files

Installing the JDK automatically creates a directory called jdk–feature.interim.update.patch where feature ( 17 ),interim, update, and patch represent corresponding values of version information.

If you install JDK in a specific location such as /opt , you must log in with root credentials to gain the necessary permissions. If you do not have the root access, either install the JDK in your home directory or a sub directory for which you have the write permissions.

If you install the software in a directory that contains a sub directory named jdk– 17 .interim.update.patch , 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.

Installing the JDK from archive files doesn’t configure the backing store for the system node of Java Preferences API ( java.util.prefs Java package). If this functionality of the JDK is required, you need to manually configure it by making sure either /etc/.java/.systemPrefs or jdk– 17 .interim.update.patch/.systemPrefs directory exists.

General Notes About Installing the JDK on Linux Platforms from RPM packages

This topic describes general information about installing JDK 17 from RPM packages on Linux platforms.

You can install only one version of JDK of the same feature release. If you try to install the newer version of the same feature release while the older version exists, the installer uninstalls the older version and installs the new version. For example, you can’t install jdk- 17 and jdk- 17 .0.1 simultaneously. If you attempt to install jdk- 17 .0.1 after jdk- 17 is installed, the installer uninstalls jdk- 17 and installs jdk- 17 .0.1 .

All versions of JDK of the same feature release are installed in /usr/lib/jvm/jdk- 17 -oracle- directory, where equals x64 or aarch64 . Additionally /usr/java/jdk- 17 symbolic link pointing to the installation directory is created for backward compatibility.

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.

You must log in with root credentials to install or update JDK.

By default, the installation script configures the system such that the backing store for the system node of Java Preferences API (java.util.prefs Java package) is configured in /etc/.java/.systemPrefs directory.

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.

Читайте также:  Linux hdd smart info

Using the java -version command, you can confirm the default (recently installed) JDK version.

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.

For example, you can’t install jdk- 17 and jdk- 17 .0.1 simultaneously. If you attempt to install jdk- 17 .0.1 after jdk- 17 is installed, the installer uninstalls jdk- 17 and installs jdk- 17 .0.1 .

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- _linux-x64_bin.tar.gz

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

jdk-17_linux-aarch64_bin.tar.gz

Installing the JDK on Linux from Archive Files, RPM Packages and Oracle Linux Repositories

You can install the JDK on a Linux platform from archive files, downloadable Red Hat Package Manager (RPM) packages files, or RPM packages from Oracle Linux (OL) repositories.

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 downloadable RPM packages ( .rpm ): This allows you to perform a system-wide JDK installation on RPM-based Linux platforms 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.
  • From Oracle Linux repositories : This allows you to perform a system-wide JDK installation on OL platforms starting from OL7 for all users, and requires root access. JDK RPM packages in Oracle Linux RPM repositories are available for x64 and aarch64 (64-bit ARM) OL platforms. Explicit download of JDK RPM packages is not required, the package manager will do it automatically for you.

JDK RPM packages for Generic Linux platforms and Oracle Linux platforms differ. The following table lists the differences:

Table 3-1 Difference between Generic Linux and OL platforms

JDK image is split into two packages: jdk- 17 -headless and jdk- 17 -headful .

  • jdk- 17 -headless is a headless Java Runtime for running non-GUI applications.
  • jdk- 17 -headful is headful Java Runtime and Development Tools for developing and running all types of applications.

jdk- 17 -headful package requires jdk- 17 -headless package. When these packages are installed together, they provide the same functionality as the jdk- 17 package for Generic Linux Platforms.

Читайте также:  Простые скрипты для linux

jdk- 17 -headless package registers java group with the alternatives framework.

jdk- 17 -headful package registers javac group with the alternatives framework.

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

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

Installing the 64-Bit JDK on RPM-Based Linux Platforms

You can install the JDK on 64-bit RPM-based Linux platforms, such as Red Hat and SuSE by using a downloadable RPM package file ( .rpm ) in the system location.

You can install the JDK using a downloadable RPM package file on an OL system too, but the preferred way to install the JDK on OL systems is from Oracle Linux RPM repositories.

Ensure that you have the root user access. You can do this by running the command su and entering the superuser password.

  • For x64 systems: jdk- 17 .interim.update.patch_linux-x64_bin.rpm . For example, jdk- 17 _linux-x64_bin.rpm
  • For aarch64 (64-bit ARM) systems: jdk- 17 .interim.update.patch_linux-aarch64_bin.rpm . For example, jdk- 17 _linux-aarch64_bin.rpm

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

Upgrade the required package using the following command: $ sudo rpm -Uvh jdk- 17 _linux-x64_bin.rpm OR $ sudo rpm -Uvh jdk- 17 _linux-aarch64_bin.rpm

Note: JDK 17 can coexist with other feature releases of JDK. For each feature release, a separate directory is created, the default directory being /usr/lib/jvm/jdk- -oracle- . For example, JDK 17 releases for x64 will be installed in /usr/lib/jvm/jdk- 17 -oracle-x64 directory.

Источник

Installing jdk bin on linux

See supported System Configurations for information about supported platforms, operating systems, desktop managers, and browsers.

On a 64-bit system, you can download either the 64-bit or the 32-bit version of the Java platform. However, if you are using a 32-bit browser and you want to use the plugin, then you need to install the 32-bit version of the Java platform. To determine which version of Firefox you are running, launch the application, and select the menu item Help -> About Mozilla Firefox. At the bottom of the window is a version string line that contains either «Linux i686» (32-bit) or «Linux x86_64» (64-bit). To setup the Java plugin, see step 6.

Читайте также:  Falling back to interactive prompt arch linux

Installation Instructions

This procedure installs the Java Development Kit (JDK) for 64-bit Linux, using a self-extracting binary file. The JDK download includes the Java SE Runtime Environment (JRE) – you do not have to download the JRE separately.

For RPM-based Linux distributions, like Red Hat or SuSE, refer to the RPM installation instructions.

The name of the downloaded file has the following format:

To install, download this file and use the following instructions.

  1. Download and check the download file size. You can download to any directory that you can write to. This bundle can be installed by anyone (not only root users), in any location that the user can write to. However, only the root user can displace the system version of the Java platform supplied by Linux.
  2. Make sure that execute permissions are set Run this command: % chmod +x 6u -linux-x64.bin
  3. Change directory to the location where you would like the files to be installed. The next step installs the JDK into the current directory.
  4. Run the self-extracting binary. Execute the downloaded file, prepended by the path to it. For example, if the file is in the current directory, prepend it with » ./ » (necessary if » . » is not in the PATH environment variable): % ./jdk-6u -linux-x64.bin The binary code license is displayed, and you are prompted to agree to its terms. The Java Development Kit files are installed in a directory called jdk.6.0_ in the current directory. Follow this link to see its directory structure.
  5. Delete the bin file if you want to save disk space.

Note about Root Access: Installing the software automatically creates a directory called jre1.6.0_ . Note that if you choose to install the Java SE Runtime Environment into system-wide location such as /usr/local , you must first become root to gain the necessary permissions. If you do not have root access, simply install the Java SE Runtime Environment into your home directory, or a subdirectory that you have permission to write to.

Note about Overwriting Files: If you install the software in a directory that contains a subdirectory named jre1.6.0_ , the new software overwrites files of the same name in that jre1.6.0_ directory. Please be careful to rename the old directory if it contains files you would like to keep.

Note about System Preferences: By default, the installation script configures the system such that the backing store for system preferences is created inside the JDK’s installation directory. If the JDK is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines.

See the Preferences API documentation for more information about preferences in the Java platform.

Источник

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