Arch linux oracle java

How to Install Java on Arch Linux

Java is undoubtedly one of the most popular programming languages ever to grace the face of the planet, powering millions of applications both on Linux and Windows platforms.

Java comprises of JRE (Java Runtime Environment) and JDK (Java Development Toolkit). JRE is a set of software applications that help in the deployment of Java applications. JDK is a development environment necessary for the building and compilation of Java applications.

In this tutorial, we are going to take you through a step by step of how you can install Java on Arch Linux.

Step 1: Check If Java is Installed

To begin with, let’s check if Java is installed in the Arch Linux using the following command.

$ java -version OR $ which java

Check Java Installation on Arch Linux

From the output above, it evident that Java is missing. Let’s now proceed and install both JRE and JDK which both constitute JAVA.

Step 2: Install JRE in Arch Linux

To install JRE (Java Runtime Environment), a first search which versions are available for download using the command.

$ sudo pacman -sS java | grep jre

Search Java Version in Arch Linux

To install the latest version of JRE, run the command.

Читайте также:  Tmp command in linux

Install Java JRE in Arch Linux

Press Y and hit ENTER to proceed with the installation of JRE and other dependencies.

Step 3: Install JDK in Arch Linux

With JRE installed, we can proceed to install JDK on our Arch Linux system. Once again, let’s search for the versions of JDK that are available for download.

$ sudo pacman -sS java | grep jdk

Search Java JDK Version in Arch Linux

The first option is usually the latest version, so to install the latest JDK, run the command.

Install JDK in Arch Linux

As shown before, press Y when prompted and hit ENTER to continue with the installation process. This will take a bit more of your time, so some patience will do.

At this point, we have successfully installed JAVA on our Arch Linux system.

To verify that JAVA has indeed been installed, run.

Verify Java Version in Arch Linux Check Java Command Location

Conclusion

In this article, we demonstrated how you can install Java on Arch Linux. You can now proceed and install applications such as Apache Tomcat, Maven, Jenkins, and Gradle.

Источник

Arch Linux User Repository

@azzbcc @valsaven Package updated. Fix applied, thanks for noticing.

valsaven commented on 2023-06-19 06:48 (UTC)

@dbermond Could you fix the paths, please? This is easy to change by hand, but not everyone reads the comments and will notice it.

azzbcc commented on 2023-05-13 06:29 (UTC)

wrong path in java.desktop and jconsole.desktop

hugegameartgd commented on 2022-05-06 22:43 (UTC) (edited on 2022-05-06 22:44 (UTC) by hugegameartgd)

Maybe upgrading would work with provides = jre18-jdk=18.0.1 instead of 18.0.1-1 in .SRCINFO?

dbermond commented on 2022-05-05 20:38 (UTC)

@MidnightStarSign Sorry, but distributions other than Arch Linux are not supported here. Please seek help on your distribution support channels.

MidnightStarSign commented on 2022-05-05 19:30 (UTC)

I’m encountering an issue where I upgrade this using pamac, but the update is still available despite it being successful.

I found this from another forum regarding the issue: «The maintainer changed the package versioning pattern and did not adopt .SRCINFO, hence AUR helpers interpret that in a way that there is a new update available although there isn’t».

Читайте также:  Общая папка virtualbox windows 10 linux

Not sure if that is what’s going on here.

Checking keyring. [1/1] Checking integrity. [1/1] Loading package files. [1/1] Checking file conflicts. [1/1] Checking available disc space. [1/1] Reinstalling jre (17.0.1-1). [1/1] Transaction successfully finished. 

dbermond commented on 2022-03-24 13:51 (UTC)

For users wanting the Oracle Java LTS release, there are now lts packages for convenience: jdk-lts, jre-lts and jdk-lts-doc.

dimich commented on 2022-01-20 15:40 (UTC) (edited on 2022-01-20 16:59 (UTC) by dimich)

UPD: Hm, nevermind. Now downloaded successfully without any changes. Maybe some malfunction of the server.

Seems Oracle doesn’t allow to download jdk-14.0.2_linux-x64_bin.tar.gz directly from script any more:

Sorry! In order to download products from Oracle Technology Network you must agree to the OTN license terms. Be sure that. Your browser has "cookies" and JavaScript enabled. You clicked on "Accept License" for the product you wish to download. You attempt the download within 30 minutes of accepting the license. 

drslmr commented on 2021-11-22 14:00 (UTC)

Update to my last comment:

My issue was, that I get this «undefined symbol: ipv6_available» when executing jar and other jdk executables.

Now I see that un-setting LD_LIBRARY_PATH in the bash shell fixes the problem too.

I tried to find who (which service/program) sets LD_LIBRARY_PATH , in my case to /usr/lib:/usr/lib:/usr/lib:/usr/lib , but I could not find it, neither in my user resource file nor in the system resource files I know off.

drslmr commented on 2021-11-12 09:20 (UTC)

I needed to add the server path to the LD_LIBRARY_PATH.

Источник

Arch Linux User Repository

@azzbcc @valsaven Package updated. Fix applied, thanks for noticing.

valsaven commented on 2023-06-19 06:48 (UTC)

@dbermond Could you fix the paths, please? This is easy to change by hand, but not everyone reads the comments and will notice it.

azzbcc commented on 2023-05-13 06:29 (UTC)

wrong path in java.desktop and jconsole.desktop

hugegameartgd commented on 2022-05-06 22:43 (UTC) (edited on 2022-05-06 22:44 (UTC) by hugegameartgd)

Maybe upgrading would work with provides = jre18-jdk=18.0.1 instead of 18.0.1-1 in .SRCINFO?

Читайте также:  Softline обучение astra linux

dbermond commented on 2022-05-05 20:38 (UTC)

@MidnightStarSign Sorry, but distributions other than Arch Linux are not supported here. Please seek help on your distribution support channels.

MidnightStarSign commented on 2022-05-05 19:30 (UTC)

I’m encountering an issue where I upgrade this using pamac, but the update is still available despite it being successful.

I found this from another forum regarding the issue: «The maintainer changed the package versioning pattern and did not adopt .SRCINFO, hence AUR helpers interpret that in a way that there is a new update available although there isn’t».

Not sure if that is what’s going on here.

Checking keyring. [1/1] Checking integrity. [1/1] Loading package files. [1/1] Checking file conflicts. [1/1] Checking available disc space. [1/1] Reinstalling jre (17.0.1-1). [1/1] Transaction successfully finished. 

dbermond commented on 2022-03-24 13:51 (UTC)

For users wanting the Oracle Java LTS release, there are now lts packages for convenience: jdk-lts, jre-lts and jdk-lts-doc.

dimich commented on 2022-01-20 15:40 (UTC) (edited on 2022-01-20 16:59 (UTC) by dimich)

UPD: Hm, nevermind. Now downloaded successfully without any changes. Maybe some malfunction of the server.

Seems Oracle doesn’t allow to download jdk-14.0.2_linux-x64_bin.tar.gz directly from script any more:

Sorry! In order to download products from Oracle Technology Network you must agree to the OTN license terms. Be sure that. Your browser has "cookies" and JavaScript enabled. You clicked on "Accept License" for the product you wish to download. You attempt the download within 30 minutes of accepting the license. 

drslmr commented on 2021-11-22 14:00 (UTC)

Update to my last comment:

My issue was, that I get this «undefined symbol: ipv6_available» when executing jar and other jdk executables.

Now I see that un-setting LD_LIBRARY_PATH in the bash shell fixes the problem too.

I tried to find who (which service/program) sets LD_LIBRARY_PATH , in my case to /usr/lib:/usr/lib:/usr/lib:/usr/lib , but I could not find it, neither in my user resource file nor in the system resource files I know off.

drslmr commented on 2021-11-12 09:20 (UTC)

I needed to add the server path to the LD_LIBRARY_PATH.

Источник

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