Fedora: Uninstall Java JDK 1.8 and install Oracle Java 1.7.15

Hi All,

I have just downloaded fedora 27 iso and set it up in virtual box.

I want to learn Hadoop so trying to install Apache hadoop. Before all those I have to install Oracle Java 1.7.15 (as mentioned in the Apache hadoop page).

Can you please help me how to Uninstall currently installed Java JDK (1.8.XX) in install the new Oracle Java 1.7.15.?

Would be of great help if you can also share steps to intall hadopp, pig an hive in fedora.

Best,
Tech

This is how you remove Java JDK on Fedora

sudo dnf remove java-1.8.0-openjdk -y
1 Like

Thank you. May I know where to learn all these commands please?

I want to learn basics like how to install, uninstall.
Where will the files get copied if i install., and other stuffs.

man pages is the best place to get started and to advance. lookup man pages for dnf. since dnf is an administrative command you always precede it with sudo when invoking.

Thank you !!

not a problem.

No need to uninstall anything.

Install the required oracle java using rpm.
Using alternatives command as superuser one can change the default java used.

Bare in mind, that perhaps some programs on the system rely on open java, so above change could affect those.

One could also download only required oracle java as compressed archive with all binaries and libraries required.
Create a user on the system which will utilize that java environment.
Unpack the archive under /opt/orajava (for instance)
As root, chown /opt/orajava to user created.
Setup required java options in user home directory profile file (JAVA_HOME etc.)
Configure kernel parameters for that user, depending on the application requirements/load (if applicable, defaults are often ok).

Above setup will have no effect on the system other then running new processes/code (load) under user created above and consuming disk space required.

Hope that helps
Regards
Peasant.