Setting JAVA HOME is a requirement when working with particular software and online advise has often misled poor souls in to long tedious processes. Why waste time sitting in front of your computer while you can grab popcorn and cuddle (Unless if you don’t have a girlfriend then you can properly utilize ‘incognito’ for its intended use :lol:).
Setting JAVA HOME is pretty easy.
- Download java if you don’t have it installed. You get a latest version here. Download a 64 bit rpm and then cd into your Downloads folder. Run: $sudo yum localinstall <rpmname> E.g: $sudo yum localinstall jdk-8u161-linux-x64.rpm NB: Do a direct yum install if you want all dependecies installed by default.
Setting the home:
For a JDK installation, your java will mostly be in: /usr/java/<javaversion>
Go to /etc/profile by running:
Then add the following line at the bottom:
If you want this home variable to apply across all users, add the line:
To load these changes without having to restart, run:
With that, your changes will take immediate effect.
Run: echo $JAVA_HOME to confirm your changes.
For any questions or clarifications, post them in the comments.