Updated, fixed 'Installing Java'.

This commit is contained in:
Robert Krátký 2018-01-01 17:22:37 +01:00
parent da9e9dcc32
commit 265dffd03f
2 changed files with 22 additions and 21 deletions

View file

@ -14,23 +14,28 @@ $ dnf search openjdk
==== ====
Various flavors of OpenJDK are available. For information about these options, search the link:http://openjdk.java.net/[OpenJDK web site]. 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: . Run the following command to install OpenJDK:
+ +
---- ----
$ dnf install <openjdk-package-name> # dnf install <openjdk-package-name>
---- ----
+ +
For example: For example:
+ +
---- ----
$ dnf install java-1.8.0-openjdk.x86_64 # dnf install java-1.8.0-openjdk.x86_64
---- ----
// tag::java-alternatives[]
[NOTE] [NOTE]
==== ====
If you have installed other versions of Java, you might need to switch the active version of java: 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.
====
----
# alternatives --config java
----
A list of installed Java versions is displayed. Choose the version you require.
====
// end::java-alternatives[]

View file

@ -1,22 +1,18 @@
[id='installing-oracle-java'] [id='installing-oracle-java-se']
= Installing Oracle Java SE = Installing Oracle Java SE
To install Oracle Java SE: To install Oracle Java SE:
. Navigate to link:http://www.oracle.com/technetwork/java/javase/downloads[Oracle Java SE downloads page]. . Navigate to link:http://www.oracle.com/technetwork/java/javase/downloads[Oracle Java SE downloads page].
. Choose the version of Java you wish to use. Typically, you would navigate to the link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
[version 8 page]. . Choose the version of Java you wish to use. Typically, you would navigate to the link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[version 8 page].
. Accept the license agreement and download the appropriate rpm file for your systems architecture. For example, if you run 64 bit Fedora, choose the `jdk-8u151-linux-x64.rpm` file.
. Accept the license agreement and download the appropriate rpm file for your systems architecture. For example, if you run 64-bit Fedora, choose the `jdk-8u151-linux-x64.rpm` file.
. Enter the following command to install Oracle Java SE: . Enter the following command to install Oracle Java SE:
+ +
---- ----
$ rpm -i jdk-8u151-linux-x64.rpm # dnf install jdk-8u151-linux-x64.rpm
---- ----
[NOTE]
==== include::proc_installing-openjdk.adoc[tags=java-alternatives]
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.
====