Home FAQ How to Install Oracle Java 10 In Arch Linux

How to Install Oracle Java 10 In Arch Linux

By sk
Published: Updated: 4K views

This brief tutorial will teach you how to install Oracle Java 10 in Arch Linux and its derivatives such as Antergos and Manjaro Linux etc. We can install Oracle Java either from the source or using any AUR helper programs, for example Yay. However, Installing Java using Yay AUR helper is the easiest and simplest way. Let us get started.

First update your Arch Linux system using command:

$ sudo pacman -Syu

Then, install Yay if you haven't installed it yet as described in the following link.

Install Oracle Java 10 in Arch Linux

After installing Yay, search for the available Java versions.

Search available Oracle Java versions using command:

$ yay jdk

The above command will display all available Oracle JDK and JRE versions. Just type the number of your choice. I am going to install the most recent version of Oracle Java, which is Version 10.0.2 as of writing this guide. So, I entered the number : 24.

1 extra/jdk10-openjdk 10.0.1.u10-1 (78.0 MiB 89.2 MiB) 
OpenJDK Java 10 development kit
2 extra/jdk7-openjdk 7.u171_2.6.13-1 (15.2 MiB 19.6 MiB) 
OpenJDK Java 7 development kit
3 extra/jdk8-openjdk 8.u172-2 (8.2 MiB 38.0 MiB) (Installed)
OpenJDK Java 8 development kit
4 extra/jdk9-openjdk 9.0.4.u11-1 (78.0 MiB 89.8 MiB) 
OpenJDK Java 9 development kit
5 extra/jre10-openjdk 10.0.1.u10-1 (229.6 KiB 663.0 KiB) 
OpenJDK Java 10 full runtime environment
6 extra/jre10-openjdk-headless 10.0.1.u10-1 (34.3 MiB 170.5 MiB) 
OpenJDK Java 10 headless runtime environment
7 extra/jre7-openjdk 7.u171_2.6.13-1 (160.4 KiB 444.0 KiB) 
OpenJDK Java 7 full runtime environment
8 extra/jre7-openjdk-headless 7.u171_2.6.13-1 (42.6 MiB 78.3 MiB) 
OpenJDK Java 7 headless runtime environment
9 extra/jre8-openjdk 8.u172-2 (166.6 KiB 458.0 KiB) (Installed)
OpenJDK Java 8 full runtime environment
10 extra/jre8-openjdk-headless 8.u172-2 (26.0 MiB 95.8 MiB) (Installed)
OpenJDK Java 8 headless runtime environment
11 extra/jre9-openjdk 9.0.4.u11-1 (230.7 KiB 632.0 KiB) 
OpenJDK Java 9 full runtime environment
12 extra/jre9-openjdk-headless 9.0.4.u11-1 (34.1 MiB 170.7 MiB) 
OpenJDK Java 9 headless runtime environment
13 extra/openjdk10-doc 10.0.1.u10-1 (14.7 MiB 309.5 MiB) 
OpenJDK Java 10 documentation
14 extra/openjdk10-src 10.0.1.u10-1 (55.1 MiB 62.5 MiB) 
OpenJDK Java 10 sources
15 extra/openjdk7-doc 7.u171_2.6.13-1 (10.8 MiB 233.2 MiB) 
OpenJDK Java 7 documentation
16 extra/openjdk7-src 7.u171_2.6.13-1 (38.4 MiB 43.0 MiB) 
OpenJDK Java 7 sources
17 extra/openjdk8-doc 8.u172-2 (12.0 MiB 271.8 MiB) 
OpenJDK Java 8 documentation
18 extra/openjdk8-src 8.u172-2 (21.0 MiB 22.8 MiB) 
OpenJDK Java 8 sources
19 extra/openjdk9-doc 9.0.4.u11-1 (14.7 MiB 316.8 MiB) 
OpenJDK Java 9 documentation
20 extra/openjdk9-src 9.0.4.u11-1 (55.2 MiB 63.5 MiB) 
OpenJDK Java 9 sources
21 extra/visualvm 1.3.9-1 (7.9 MiB 32.4 MiB) 
Visual tool integrating several commandline JDK tools and lightweight profiling capabilities
22 community/java-atk-wrapper-openjdk7 0.33.3-1 (3.6 KiB 1.0 KiB) 
ATK wrapper for screen reader access to Java Swing applications - OpenJDK 7
23 community/java-atk-wrapper-openjdk8 0.33.3-1 (3.5 KiB 1.0 KiB) 
ATK wrapper for screen reader access to Java Swing applications - OpenJDK 8
24 aur/jdk 10.0.2-1 (+787 5.21%) 
Oracle Java Development Kit
25 aur/jdk7 7u80-1 (+136 0.15%) 
Oracle Java 7 Development Kit (public release - end of support)
26 aur/jdk6 6u45-6 (+85 0.93%) 
Oracle Java 6 Development Kit (public release - end of support)
27 aur/jdk-docs 10.0.2-1 (+57 0.41%) 
Documentation for Oracle Java Development Kit
28 aur/jdk8 8u181-1 (+55 4.18%) 
Oracle Java 8 Development Kit
29 aur/jdk-devel 11b24-1 (+40 0.95%) 
Oracle Java 11 Development Kit Snapshot
30 aur/jre8-openjdk-headless-infinality 8.u172-3 (+33 0.31%) (Orphaned) 
OpenJDK Java 8 headless runtime environment with infinality patch applied
31 aur/jre8-openjdk-infinality 8.u172-3 (+33 0.31%) (Orphaned) 
OpenJDK Java 8 full runtime environment with infinality patch applied
32 aur/jdk8-openjdk-infinality 8.u172-3 (+33 0.31%) (Orphaned) 
OpenJDK Java 8 development kit with infinality patch applied
33 aur/jdk7-openjdk-infinality 7.u171_2.6.13-1 (+27 0.10%) 
OpenJDK Java 7 development kit
34 aur/jre7-openjdk-infinality 7.u171_2.6.13-1 (+27 0.10%) 
OpenJDK Java 7 full runtime environment
35 aur/jre7-openjdk-headless-infinality 7.u171_2.6.13-1 (+27 0.10%) 
OpenJDK Java 7 headless runtime environment
36 aur/intellij-idea-ce 2018.2-1 (+25 1.08%) 
Intellij Idea IDE (community version) with Intellij JDK
37 aur/intellij-jdk 8u152b1293.1-1 (+21 0.12%) 
OpenJDK Java 8 development kit with some fixes and enhancements by JetBrains
38 aur/bin32-jdk 8u181-1 (+17 0.11%) 
Oracle Java 8 Development Kit (32-bit)
39 aur/jdk-arm 8u181-1 (+13 0.64%) 
Oracle Java Development Kit (v8) for ARMv7, ARMv6 and ARMv8 (64-bit)
40 aur/jre8-openjdk-jetbrains-headless 8.u152.b1119.3-1 (+10 0.43%) 
OpenJDK Java 8 headless runtime environment (with JetBrains patches)
41 aur/jre8-openjdk-jetbrains 8.u152.b1119.3-1 (+10 0.43%) 
OpenJDK Java 8 full runtime environment (with JetBrains patches)
42 aur/openjdk8-jetbrains-doc 8.u152.b1119.3-1 (+10 0.43%) 
OpenJDK Java 8 documentation (with JetBrains patches)
43 aur/jdk8-openjdk-jetbrains 8.u152.b1119.3-1 (+10 0.43%) 
OpenJDK Java 8 development kit (with JetBrains patches)
44 aur/openjdk8-jetbrains-src 8.u152.b1119.3-1 (+10 0.43%) 
OpenJDK Java 8 sources (with JetBrains patches)
45 aur/jdk-demos 8u181-1 (+7 0.00%) 
Demos and samples of common tasks and new functionality in Oracle Java 8 Development Kit
46 aur/bin32-jdk7 7u80-1 (+7 0.00%) 
Oracle Java 7 Development Kit (32-bit) (public release - end of support)
47 aur/jdk8-docs 8u181-1 (+7 0.30%) 
Documentation for Oracle Java 8 Development Kit
48 aur/jdk-devel-docs 11b24-1 (+7 0.02%) 
Documentation for Oracle Java 11 Development Kit Snapshot
49 aur/jdk9 9.0.4-1 (+6 0.54%) 
Oracle Java 9 Development Kit (public release - end of support)
50 aur/jdk9-openj9-bin 9.181-2 (+6 0.04%) (Out-of-date 2018-06-30) 
Eclipse (former IBM) OpenJ9 with openjdk9
51 aur/tuxjdk-doc 8.152.03-2 (+5 0.00%) 
OpenJDK Java 8 documentation
52 aur/tuxjdk 8.152.03-2 (+5 0.00%) 
Enhanced Open Java Development Kit for developers on Linux. Contains series of patched to OpenJDK to enhance user experience with Java-based and Swing-based tools (NetBeans, Idea, Android Studio, etc)
53 aur/tuxjdk-src 8.152.03-2 (+5 0.00%) 
OpenJDK Java 8 sources
54 aur/jdk8-j9-bin 8.0.5.7-1 (+4 0.02%) 
IBM® SDK, Java Technology Edition, Version 8
55 aur/jdk8-openj9-bin 8u162-b12-1 (+4 0.08%) 
Eclipse (former IBM) OpenJ9 with openjdk8
56 aur/bin32-jdk6 6u45-5 (+3 0.00%) 
Oracle Java 6 Development Kit (32-bit) (public release - end of support)
57 aur/jdk5 5u22-1 (+3 0.00%) 
Oracle Java 5 Development Kit (public release - end of support)
58 aur/ldapjdk 4.19-1 (+2 0.00%) 
The Mozilla LDAP Java SDK
59 aur/bin32-jdk5 5u22-1 (+2 0.00%) 
Oracle Java 5 Development Kit (32-bit) (public release - end of support)
60 aur/zulu-jdk 8u144b01-1 (+2 0.01%) (Out-of-date 2017-11-13) 
Zulu JVM built upon OpenJDK 8
61 aur/jdk7r1-j9-bin 7.1.4.15-1 (+1 0.02%) 
IBM® SDK, Java Technology Edition, Version 7 Release 1
62 aur/jdk-dcevm 8u144-1 (+1 0.00%) 
Oracle Java Development Kit with DCEVM patches
63 aur/java8-openjdk-hsdis 8.u112-1 (+1 0.00%) (Out-of-date 2018-05-14) 
Disassembler for HotSpot
64 aur/jdk7-j9-bin 7.0.10.15-1 (+1 0.02%) 
IBM® SDK, Java Technology Edition, Version 7
65 aur/jre8-openjdk-shenandoah 8.u172_20180725_hotspot90ead13709c0-1 (+0 0.00%) 
OpenJDK Java 8 full runtime environment
66 aur/jre8-openjdk-shenandoah-headless 8.u172_20180725_hotspot90ead13709c0-1 (+0 0.00%) 
OpenJDK Java 8 headless runtime environment
67 aur/jdk8-openjdk-shenandoah 8.u172_20180725_hotspot90ead13709c0-1 (+0 0.00%) 
OpenJDK Java 8 development kit
68 aur/openjdk8-shenandoah-src 8.u172_20180725_hotspot90ead13709c0-1 (+0 0.00%) 
OpenJDK Java 8 sources
69 aur/openjdk8-shenandoah-doc 8.u172_20180725_hotspot90ead13709c0-1 (+0 0.00%) 
OpenJDK Java 8 documentation
70 aur/jtreg 4.2+b12+7b1496d2790e-1 (+0 0.00%) 
Regression Test Harness for the JDK
71 aur/jtreg-hg r429+.7b1496d2790e+-1 (+0 0.00%) 
Regression Test Harness for the JDK
72 aur/java-8-openjdk-shenandoah b219-1 (+0 0.00%) (Orphaned) 
OpenJDK Java 8 development kit with ultra-low pause time Shenandoah GC
==> Packages to install (eg: 1 2 3, 1-3 or ^4)
==> 24

During installation, you will be asked to enter the password of the sudo user. Enter the password and wait for few moments to complete the installation.

Next check available Java environments in your system using command:

$ archlinux-java status
Available Java environments:
java-10-jdk
java-8-openjdk (default)

As you see in the above output, I have two Java versions (openjdk and oracle java) and the default environment is java-8-openjdk. To set Oracle jdk as default java, run the following command:

$ sudo archlinux-java set java-10-jdk/jre

If you have set an invalid java environment link, use the following command to fix it.

$ sudo archlinux-java fix

That's it. Now, check the java version using command:

$ java -version

Sample output:

java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

As you see in the above output, the latest stable version of Oracle Java has been installed.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

6 comments

AnnaSmothers July 14, 2016 - 5:19 am

Thanks for this, but why not nr 14 instead of 43?

Reply
SK July 14, 2016 - 11:01 am

I chose 43. You can choose whatever version you want. Cheers!

Reply
RuslanIvanilov1977 April 16, 2017 - 10:55 am

Thanks bro!

Reply
douglaspio July 31, 2018 - 10:00 pm

Thanks, guy!!!

Reply
Fred L October 11, 2018 - 6:22 am

When I do $ yay jdk and then choose 24 I get “Packages to cleanBuild?” [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
then a lengthy Oracle agreement I can’t get past. What am I supposed to do there?

Reply
sk October 11, 2018 - 9:48 am

Just press ENTER to continue installation.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More