#122 Fix docs for oracle java installation.
Merged 5 years ago by ankursinha. Opened 5 years ago by zzambers.
fedora-docs/ zzambers/quick-docs fix-oracle-java-docs  into  master

@@ -7,12 +7,12 @@ 

  

  . 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 tar.gz file for your systems architecture. Do NOT use Oracle rpms as these are NOT compatible with fedora/openjdk packages. Download tar.gz instead and unpack it somewhere.

  

- . Enter the following command to install Oracle Java SE: 

+ . Use tar to unpack downloaded archive e.g.:

  +

  ----

- # dnf install jdk-8u151-linux-x64.rpm

+ # tar -xvzf jdk-8u201-linux-x64.tar.gz

  ----

  

- include::proc_installing-openjdk.adoc[tags=java-alternatives]

+ Note that jdk-8u201-linux-x64.tar.gz is used as example only. Always make sure to download latest version available.

Changed installation instructions of Oracle Java to use tar.gz instead of rpms. Their rpms do not work correctly with fedora/openjdk packages.

I have found this page, which also says how to add Oracle JDK into alternatives:
https://fedoraproject.org/wiki/JDK_on_Fedora#Installing_Oracle_JDK_on_Fedora

Metadata Update from @jflory7:
- Pull-request tagged with: improvement, needs committer review

5 years ago

@zzambers : can you point to a reference that documents the issue with the rpms please? I've got them installed and they seem to work just fine.

In general, the rpms are preferred because they make removing the package much easier.

Metadata Update from @ankursinha:
- Pull-request tagged with: needs info

5 years ago

@zzambers : can you point to a reference that documents the issue with the rpms please? I've got them installed and they seem to work just fine.
In general, the rpms are preferred because they make removing the package much easier.

And do you have also system jdk installed?

On my system, installing oracle rpms lead to broken alternatives

I have found this page, which also says how to add Oracle JDK into alternatives:
https://fedoraproject.org/wiki/JDK_on_Fedora#Installing_Oracle_JDK_on_Fedora

That page should be removed. It is incredibly old.

I have found this page, which also says how to add Oracle JDK into alternatives:
https://fedoraproject.org/wiki/JDK_on_Fedora#Installing_Oracle_JDK_on_Fedora

That page should be removed. It is incredibly old.

It is one of the many old wiki pages, hence moving reviewed information to quick-docs.

@zzambers : can you point to a reference that documents the issue with the rpms please? I've got them installed and they seem to work just fine.
In general, the rpms are preferred because they make removing the package much easier.

And do you have also system jdk installed?

$ rpm -qa \*jre\* \*java\*
java-1.8.0-openjdk-devel-1.8.0.201.b09-6.fc29.x86_64
android-json-org-java-6.0.1-0.5.r22.fc29.noarch
java-1.8.0-openjdk-openjfx-1.8.0.201.b09-6.fc29.x86_64
jre1.8-1.8.0_191-fcs.x86_64  -> oracle java
javamail-1.6.3-3.module_f29+2697+412960d8.noarch
java-1.8.0-openjdk-headless-1.8.0.201.b09-6.fc29.x86_64
ant-javamail-1.10.5-2.fc29.noarch
javapackages-tools-5.3.0-1.fc29.noarch
abrt-java-connector-1.1.1-2.fc29.x86_64
tzdata-java-2018i-1.fc29.noarch
antlr3-java-3.5.2-19.fc29.noarch
python3-javapackages-5.3.0-1.fc29.noarch
javapackages-filesystem-5.3.0-1.fc29.noarch
java-1.8.0-openjdk-1.8.0.201.b09-6.fc29.x86_64

Maybe because I have jre and not jdk? No problem here in daily usage.

On my system, installing oracle rpms lead to broken alternatives

That is interesting. It hsould not be devel related.. but I will try. Had you done any other steps instead of simple dnf install some.rpm?

No, not really. Installed the rpm, and I think updated the alternatives.

Please note that my use case is very small---I only use java for Jabref (which requires openjfx bits that aren't in Fedora now). So maybe I just don't see the breakages that you people see in advanced usage?

I see. Nvm. Still users should be warned to isntall oracle jdk instead of encouraged. TBH, currently there is no reason to do so those days. Can we merge now please?

@zzambers : would you add a warning to the page please as @jvanek suggests?

If the JDK bit is correct, would you be able to remove the "unreviewed warning" at the top of the page? That'll make this page ready for use.

Metadata Update from @ankursinha:
- Request assigned

5 years ago

Metadata Update from @ankursinha:
- Pull-request untagged with: needs committer review, needs info

5 years ago

Merging, this. I'll remove the unreviewed warning from the page now.

Pull-Request has been merged by ankursinha

5 years ago