mirror of
https://pagure.io/fedora-docs/quick-docs.git
synced 2024-11-25 05:37:32 +00:00
37 lines
798 B
Text
37 lines
798 B
Text
|
[id='installing-openjdk']
|
||
|
= Installing OpenJDK
|
||
|
|
||
|
To install OpenJDK from the Fedora repository:
|
||
|
|
||
|
. Run the following command to list available versions:
|
||
|
+
|
||
|
----
|
||
|
$ dnf search openjdk
|
||
|
----
|
||
|
. Copy the version of OpenJDK you want to install.
|
||
|
+
|
||
|
[NOTE]
|
||
|
====
|
||
|
Various flavors of OpenJDK are available. For information about these options, search the link:http://openjdk.java.net/[OpenJDK web site].
|
||
|
====
|
||
|
. Run the following command to install OpenJDK:
|
||
|
+
|
||
|
----
|
||
|
$ dnf install <openjdk-package-name>
|
||
|
----
|
||
|
+
|
||
|
For example:
|
||
|
+
|
||
|
----
|
||
|
$ dnf install java-1.8.0-openjdk.x86_64
|
||
|
----
|
||
|
[NOTE]
|
||
|
====
|
||
|
If you have installed other versions of Java, you might need to switch the active version of java:
|
||
|
----
|
||
|
sudo alternatives --config java
|
||
|
----
|
||
|
A list of installed java versions is displayed. Choose the version you require.
|
||
|
====
|
||
|
|