How to install Java JDK and set JAVA_HOME in Fedora

In order to install Java JDK in Fedore, please follow this process

Required data

  • development package = development java package that contains the JDK, which includes the JRE and its complements as the javac (the compiler)

Sample data

  • development package = java-1.8.0-openjdk-devel.x86_64

Process

1. Get into the machine and execute this command

[user@machine ~]# sudo dnf install java-1.8.0-openjdk-devel.x86_64

2. In order to set the JAVA_HOME please execute this command ( normally, java JDK will be placed into this path : /usr/lib/jvm/java )

[user@machine ~]# export JAVA_HOME=/usr/lib/jvm/java