how to install JDK in fedora?

To install jdk in fedora are actually many ways ...!! but I will teach you how to install manually using .RPM. 


why???. . .


because I want you to understand how to install the JDK manual with .RPM files.


ok. . . .!!!  before you install the JDK in your computer. Your downloads jdk on the oracle official website in link here ORACLE. 


then select the appropriate platform your computer. because I use a computer with OS 64 bit then I downloaded the 64 bit and you must download file with directory .rpm example :


jdk-8u121-linuk-x64.rpm




DOWNLOAD FILE HERE


if download finish. . please open your terminal and you must open root mode then open direktory downloads in terminal 

example :



1. open your terminal in search or with push ctrl + t in keyboard menu.







2. then input the following command line 

[darsono@localhost ~] su
[root@localhost darsono]# cd Downloads

look this my terminal pictures :





3. then to do check file exists or not exis you input the following command line.

[root@localhost Downloads]# ls
jdk-8u121-linux-x64.rpm

look this example my pictures :


color red is file JDK witch we download for oracel official site




4. Once the file is found now we install files using rpm as follows:

[root@localhost Downloads]# rpm -Uivh jdk-8u121-linux-x64.rpm


look this example pictures  :



because by default Fedora it self already using OpenJDK. because I am here to work with Java 8 then I update the existing configuration to OracleJDK following command:


alternatives --config java

then if you enter command this... then look this pictures :



you can select the JDK active by typing the numbers in command. because that we had installed JDK 1.8.0_121 is then we choose the number 5 in input keyboard. and look the pictures.



look this picture simbols + in command one in number 3 and now simbols + located in number 5 because we are choose the number 5 as JDK active. 




5. then if you check javac version  will generate the following


look this pictures :




and finish... You now have already successfully installed JDK.
thanks you very much have read this article ... hopefully useful..
and don't forget subscribe and like this article if article can help you resolve the problem.