quick-docs/en-US/modules/proc_installing-openjdk.adoc

42 lines
855 B
Text
Raw Normal View History

2017-12-14 17:07:39 +00:00
[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].
====
2018-01-01 16:22:37 +00:00
+
2017-12-14 17:07:39 +00:00
. Run the following command to install OpenJDK:
+
----
2018-01-01 16:22:37 +00:00
# dnf install <openjdk-package-name>
2017-12-14 17:07:39 +00:00
----
+
For example:
+
----
2018-01-01 16:22:37 +00:00
# dnf install java-1.8.0-openjdk.x86_64
2017-12-14 17:07:39 +00:00
----
2018-01-01 16:22:37 +00:00
// tag::java-alternatives[]
2017-12-14 17:07:39 +00:00
[NOTE]
====
2018-01-01 16:22:37 +00:00
If you have installed other versions of Java, you might need to switch the active version of Java:
2017-12-14 17:07:39 +00:00
----
2018-01-01 16:22:37 +00:00
# alternatives --config java
2017-12-14 17:07:39 +00:00
----
2018-01-01 16:22:37 +00:00
A list of installed Java versions is displayed. Choose the version you require.
====
// end::java-alternatives[]