2017-12-14 17:07:39 +00:00
|
|
|
[id='installing-openjdk']
|
2020-06-01 07:37:33 +00:00
|
|
|
= Installing OpenJDK
|
2017-12-14 17:07:39 +00:00
|
|
|
|
|
|
|
To install OpenJDK from the Fedora repository:
|
|
|
|
|
2020-06-01 07:37:33 +00:00
|
|
|
* Run the following command to list available versions:
|
2019-11-16 12:49:22 +00:00
|
|
|
|
2017-12-14 17:07:39 +00:00
|
|
|
----
|
2020-06-01 07:37:33 +00:00
|
|
|
dnf search openjdk
|
2017-12-14 17:07:39 +00:00
|
|
|
----
|
2019-11-16 12:49:22 +00:00
|
|
|
|
2020-06-01 07:37:33 +00:00
|
|
|
* Copy the version of OpenJDK you want to install.
|
2019-11-16 12:49:22 +00:00
|
|
|
|
2017-12-14 17:07:39 +00:00
|
|
|
[NOTE]
|
|
|
|
Various flavors of OpenJDK are available. For information about these options, search the link:http://openjdk.java.net/[OpenJDK web site].
|
2019-11-16 12:49:22 +00:00
|
|
|
|
|
|
|
* Run the following command to install OpenJDK:
|
|
|
|
|
2017-12-14 17:07:39 +00:00
|
|
|
----
|
2020-06-01 07:37:33 +00:00
|
|
|
sudo dnf install <openjdk-package-name>
|
2017-12-14 17:07:39 +00:00
|
|
|
----
|
2018-01-01 16:22:37 +00:00
|
|
|
|
2020-06-04 07:20:57 +00:00
|
|
|
Examples:
|
2018-01-01 16:22:37 +00:00
|
|
|
|
2017-12-14 17:07:39 +00:00
|
|
|
----
|
2020-06-04 07:20:57 +00:00
|
|
|
sudo dnf install java-1.8.0-openjdk.x86_64
|
|
|
|
----
|
|
|
|
|
|
|
|
----
|
|
|
|
sudo dnf install java-11-openjdk.x86_64
|
|
|
|
----
|
|
|
|
|
|
|
|
----
|
|
|
|
sudo dnf install java-latest-openjdk.x86_64
|
2017-12-14 17:07:39 +00:00
|
|
|
----
|
2020-06-01 07:37:33 +00:00
|
|
|
|
|
|
|
== Installing OpenJDK for development
|
|
|
|
|
|
|
|
In order to install the Java Development Kit, runtime environment and associated development tools.
|
|
|
|
|
|
|
|
----
|
|
|
|
sudo dnf install <openjdk-package-name>-devel
|
|
|
|
----
|
|
|
|
|
2020-06-04 07:20:57 +00:00
|
|
|
Examples:
|
2020-06-01 07:37:33 +00:00
|
|
|
|
|
|
|
----
|
2020-06-04 07:20:57 +00:00
|
|
|
sudo dnf install java-1.8.0-openjdk-devel.x86_64
|
2020-06-01 07:37:33 +00:00
|
|
|
----
|
|
|
|
|
2020-06-04 07:20:57 +00:00
|
|
|
----
|
|
|
|
sudo dnf install java-11-openjdk-devel.x86_64
|
|
|
|
----
|
|
|
|
|
|
|
|
----
|
|
|
|
sudo dnf install java-latest-openjdk-devel.x86_64
|
|
|
|
----
|