# Fedora: Uninstall Java JDK 1.8 and install Oracle Java 1.7.15

**URL:** <https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987>\
**Category:** Fedora\
**Created:** [December 21, 2017, 3:07pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987 "2017-12-21T15:07:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechGyaann](https://community.unix.com/letter_avatar/techgyaann/32/6_449c533f586939b6e5f246632a46421f.png) [@TechGyaann](https://community.unix.com/u/TechGyaann)\
**Post date:** [December 21, 2017, 3:07pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/1 "2017-12-21T15:07:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![milhan](https://community.unix.com/user_avatar/community.unix.com/milhan/32/80_2.png) [@milhan](https://community.unix.com/u/milhan)\
**Post date:** [December 21, 2017, 3:17pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/2 "2017-12-21T15:17:14Z")

</div>

This is how you remove Java JDK on Fedora

```nohighlight
sudo dnf remove java-1.8.0-openjdk -y

```

---

<div class="post-metadata">

**Author:** ![TechGyaann](https://community.unix.com/letter_avatar/techgyaann/32/6_449c533f586939b6e5f246632a46421f.png) [@TechGyaann](https://community.unix.com/u/TechGyaann)\
**Post date:** [December 21, 2017, 5:30pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/3 "2017-12-21T17:30:48Z")

</div>

> [@milhan](#):
>
> This is how you remove Java JDK on Fedora
> 
> ```plaintext
> sudo dnf remove java-1.8.0-openjdk -y
> 
> ```

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.

---

<div class="post-metadata">

**Author:** ![milhan](https://community.unix.com/user_avatar/community.unix.com/milhan/32/80_2.png) [@milhan](https://community.unix.com/u/milhan)\
**Post date:** [December 21, 2017, 7:40pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/4 "2017-12-21T19:40:50Z")

</div>

> [@techgyaann](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![TechGyaann](https://community.unix.com/letter_avatar/techgyaann/32/6_449c533f586939b6e5f246632a46421f.png) [@TechGyaann](https://community.unix.com/u/TechGyaann)\
**Post date:** [December 22, 2017, 6:11pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/5 "2017-12-22T18:11:23Z")

</div>

> [@milhan](#):
>
> 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 !!

---

<div class="post-metadata">

**Author:** ![milhan](https://community.unix.com/user_avatar/community.unix.com/milhan/32/80_2.png) [@milhan](https://community.unix.com/u/milhan)\
**Post date:** [December 22, 2017, 8:47pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/6 "2017-12-22T20:47:43Z")

</div>

> [@techgyaann](#):
>
> Thank you !!

not a problem.

---

<div class="post-metadata">

**Author:** ![Peasant](https://community.unix.com/user_avatar/community.unix.com/peasant/32/2251_2.png) [@Peasant](https://community.unix.com/u/Peasant)\
**Post date:** [December 22, 2017, 11:59pm UTC](https://community.unix.com/t/fedora-uninstall-java-jdk-1-8-and-install-oracle-java-1-7-15/369987/7 "2017-12-22T23:59:23Z")

</div>

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.
