top of page
BlogPageTop

Installing Java on Oracle Linux

Referenced from www.java.com (added few additional steps in order to make installation process more perfect)

Java for Linux Platforms

1. First check if Java is already installed on your machine, Type java -version, or simply run this command on your terminal: which java


2. If Java is not present, your terminal will not understand this command and it will say command not found.


3. Now to install Java, change to the directory in which you want to install. Type: cd directory_path_name

For example, to install the software in the /usr/java/ directory, Type: cd /usr/java/


4. Download the tarball Java file from www.java.com (snippet shown above). ​


5. Get 32 bit or 64 bit tarball file depending upon on your Linux machine configuration.


6. Move (sftp) the .tar.gz archive binary to the current directory /usr/java/.


7. Unpack the tarball and install Java tar zxvf jre-8u73-linux-i586.tar.gz In this example, it is installed in the /usr/java/jre1.8.0_73 directory. You can remove the version detail and rename the file according to your convenience.


8. Delete .tar.gz file if you want to save some disk space.


9. Setup .bashrc file. Type: vi ~/.bashrc and enter these two lines in the file;

export JAVA_HOME=/usr/java/jre1.8.0_73

export PATH=$PATH:$JAVA_HOME/bin


12. Now, run source ~/.bashrc


Now type command: java -version in order to see if java is successfully installed or not.


If it's not running find bin directory where you unzipped Java and run: /path_to_your_Java/bin/java -version


 

Java for RPM based Linux Platforms

  1. Become root by running su and entering the super-user password.

  2. Uninstall any earlier installations of the Java packages. rpm -e package_name

  3. Change to the directory in which you want to install. Type: cd directory_path_name For example, to install the software in the /usr/java/ directory, Type: cd /usr/java

  4. Install the package. rpm -ivh jre-8u73-linux-i586.rpm

  5. To upgrade a package, Type: rpm -Uvh jre-8u73-linux-i586.rpm

  6. Exit the root shell. No need to reboot.

  7. Delete the .rpm file if you want to save disk space.

If you have any question, please write in comments section below. Thank you!

Comments


Want to share your thoughts about this blog?

Disclaimer: Please note that the information provided on this website is for general informational purposes only and should not be taken as legal advice. Dataneb is a platform for individuals to share their personal experiences with visa and immigration processes, and their views and opinions may not necessarily reflect those of the website owners or administrators. While we strive to keep the information up-to-date and accurate, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability, or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk. We strongly advise that you consult with a qualified immigration attorney or official government agencies for any specific questions or concerns related to your individual situation. We are not responsible for any losses, damages, or legal disputes arising from the use of information provided on this website. By using this website, you acknowledge and agree to the above disclaimer and Google's Terms of Use (https://policies.google.com/terms) and Privacy Policy (https://policies.google.com/privacy).

bottom of page