You are viewing the article How to Install Oracle Java JRE on Ubuntu Linux at Thptlaihoa.edu.vn you can quickly access the necessary information in the table of contents of the article below.
Ubuntu Linux is a popular open-source operating system known for its stability, security, and user-friendly interface. While Ubuntu comes with its own open-source Java Development Kit (JDK), Oracle’s Java Runtime Environment (JRE) is often preferred for its additional features and compatibility with various software applications.
In this guide, we will explore how to install Oracle Java JRE on Ubuntu Linux, enabling you to run Java applications and enjoy the enhanced performance, security, and stability offered by the Oracle Java platform. Whether you are a developer working on a Java project or an end user who relies on Java-based software, this step-by-step tutorial will help you install Oracle Java JRE on your Ubuntu Linux system.
wikiHow is a “wiki” site, which means that many of the articles here are written by multiple authors. To create this article, 14 people, some of whom are anonymous, have edited and improved the article over time.
This article has been viewed 3,482 times.
In this article, wikiHow will show you how to install 32-bit and 64-bit Oracle Java 7 JRE (at the time of this article, latest version is 1.8.0_73 ) on 32-bit Ubuntu operating system and 64-bit. This guide also works for Debian and Linux Mint operating systems. Derived from the request of many users who just want to know how to install Oracle Java JRE on Ubuntu, this article is dedicated to those who just want to install Oracle Java JRE on Debian-based Linux computers like Debian, Ubuntu and Linux Mint. You will only be able to run and execute Java programs, but not develop and program in Java. In addition, we also have a section to talk about how to use the Oracle Java JRE in your browser using this method. You can apply for Debian, Ubuntu and Linux Mint.
- Type/Copy/Paste: file /sbin/init
- Note down your Ubuntu Linux OS texture bit version: it will be displayed here.
- Open a command line window and enter the following command:
- Type/Copy/Paste: java -version
- If OpenJDK is already installed, the output will be similar to this:
- java version “1.7.0_15”
OpenJDK Runtime Environment (IcedTea6 1.10pre) (6b15~pre1-0lucid1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
- java version “1.7.0_15”
- If OpenJDK is already installed on your computer, you have a vendor version that is not intended for this article.
- Type/Copy/Paste: sudo apt-get purge openjdk-*
- This command will completely remove OpenJDK/JRE from your computer
- Type/Copy/Paste: sudo mkdir -p /usr/local/java
- This command will create a directory to store the Oracle Java JDK and JRE binaries.
- If you are using a 32-bit Ubuntu Linux operating system, you will download the 32-bit Oracle Java binary.
- If you are using 64-bit Ubuntu Linux, you will download the 64-bit Oracle Java binary.
- Optional: Download the Oracle Java JDK/JRE Documentation .
- Select jdk-7u40-apidocs.zip
- Important Information: The 64-bit Oracle Java binaries do not run on 32-bit Ubuntu Linux operating systems – when trying to install Oracle Java 64-bit on this operating system, you will receive various error messages.
- Instructions for installing 32-bit Oracle Java on 32-bit Ubuntu Linux operating system:
- Type/Copy/Paste: cd /home/ “your_username” /Downloads
- Type/Copy/Paste: sudo cp -r jre-8u73-linux-i586.tar.gz /usr/local/java
- Type/Copy/Paste: cd /usr/local/java
- Instructions for installing 64-bit Oracle Java on 64-bit Ubuntu Linux operating system:
- Type/Copy/Paste: cd /home/ “your_username” /Downloads
- Type/Copy/Paste: sudo cp -r jre-8u73-linux-x64.tar.gz /usr/local/java
- Type/Copy/Paste: cd /usr/local/java
- Instructions for installing 32-bit Oracle Java on 32-bit Ubuntu Linux:
- Type/Copy/Paste: sudo chmod a+x jre-8u73-linux-i586.tar.gz
- Instructions to install Oracle Java 64-bit on Ubuntu Linux 64-bit:
- Type/Copy/Paste: sudo chmod a+x jre-8u73-linux-x64.tar.gz
- Instructions for installing 32-bit Oracle Java on 32-bit Ubuntu Linux:
- Type/Copy/Paste: sudo tar xvzf jre-8u73-linux-i586.tar.gz
- Instructions to install Oracle Java 64-bit on Ubuntu Linux 64-bit:
- Type/Copy/Paste: sudo tar xvzf jre-8u73-linux-x64.tar.gz
- Type/Copy/Paste: ls -a
- jre1.8.0_73
- Type/Copy/Paste: sudo gedit /etc/profile
- or
- Type/Copy/Paste: sudo nano /etc/profile
- Type/Copy/Paste:
JAVA_HOME=/usr/local/java/ jre1.8.0_73
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
- Type/Copy/Paste: sudo update-alternatives –install “/usr/bin/java” “java” “/usr/local/java/jre1.8.0_73/bin/java” 1
- this command tells the system that the Oracle Java JRE is ready to use
- Type/Copy/Paste: sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/local/java/jre1.8.0_73/bin/javaws” 1
- This command tells the system that Oracle Java Web is available
- Type/Copy/Paste: sudo update-alternatives –set java /usr/local/java/jre1.8.0_73/bin/java
- This is the command to set up the Java runtime environment for the system.
- Type/Copy/Paste: sudo update-alternatives –set javaws /usr/local/java/jre1.8.0_73/bin/javaws
- This is the command to set up Java Web startup on the computer.
- Type/Copy/Paste: . /etc/profile
- Note down the path the /etc/profile file will be reloaded after restarting the computer.
- Type/Copy/Paste: java -version
- This command will show the Java version on your machine
- The following message will be displayed:
- java version (java version) “1.8.0_05”
Java(TM) SE Runtime Environment (build (version) 1.8.0_05-b18)
Java HotSpot(TM) Server VM (build (version) 24.45-b08, mixed mode)
- java version (java version) “1.8.0_05”
- Type/Copy/Paste: java -version
- This command will show the Java version running on your machine
- The following message will be displayed:
- java version (java version) “1.8.0_73”
Java(TM) SE Runtime Environment (build (version) 1.8.0_05-b18)
Java HotSpot(TM) 64-Bit Server VM (build (version) 24.45-b08, mixed mode)
- java version (java version) “1.8.0_73”
Optional: How to enable Oracle Java in the browser
Important Note: Be careful when enabling Java 8 in your browser because of the multitude of vulnerabilities and security flaws. In particular, with Oracle Java 8 enabled on the browser, when a vulnerability or security error is discovered, it will be a way for bad guys to infiltrate and damage your system. For more information about vulnerabilities and security flaws in Java, you can refer to the website: Java Tester
Google Chrome
Instructions for 32-bit Oracle Java:
- Type/Copy/Paste: sudo mkdir -p /opt/google/chrome/plugins
- The directory /opt/google/chrome/plugins will be initialized.
- Type/Copy/Paste: cd /opt/google/chrome/plugins
- You will be redirected to the Google Chrome add-ons folder. Make sure you are in this correct directory before creating the soft link.
- Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.8.0_73/lib/ i386 / libnpjp2.so
- A software link from the Java JRE (Java-written applications environment) plug-in libnpjp2.so to your Google Chrome browser will be initialized.
Instructions for Oracle Java 64-bit:
- Type/Copy/Paste: sudo mkdir -p /opt/google/chrome/plugins
- The directory /opt/google/chrome/plugins will be initialized.
- Type/Copy/Paste: cd /opt/google/chrome/plugins
- You will be redirected to the Google Chrome add-ons folder. Make sure you are in this correct directory before creating the soft link.
- Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.8.0_05/lib/ amd64 / libnpjp2.so
- A software link from the Java JRE (Java-Scripted Applications Environment) plug -in libnpjp2.so to the Google Chrome browser will be initialized.
Reminder:
- ln: creating symbpic link `./libnpjp2.so’: File exists
- To fix this, just remove the pre-existing soft link with the following command:
- Type/Copy/Paste: cd /opt/google/chrome/plugins
- Type/Copy/Paste: sudo rm -rf libnpjp2.so
- Make sure you are in the correct directory /opt/google/chrome/plugins and then run the command.
Mozilla Firefox
Instructions for 32-bit Oracle Java:
- Type/Copy/Paste: cd /usr/lib/mozilla/plugins
- You will be redirected to the /usr/lib/mozilla/plugins directory. Please initialize if this directory does not exist.
- Type/Copy/Paste: sudo mkdir -p /usr/lib/mozilla/plugins
- The directory /usr/lib/mozilla/plugins will be initialized. Make sure you are in the correct directory before proceeding to create the soft link.
- Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.8.0_73/lib/ i386 / libnpjp2.so
- The software link from the Java JRE (Java Application Runtime) plug-in libnpjp2.so to your Mozilla Firefox browser will be initialized.
Instructions for Oracle Java 64-bit
- Type/Copy/Paste: cd /usr/lib/mozilla/plugins
- You will be redirected to the /usr/lib/mozilla/plugins directory. Please initialize if this directory does not exist.
- Type/Copy/Paste: sudo mkdir -p /usr/lib/mozilla/plugins
- The directory /usr/lib/mozilla/plugins will be initialized. Make sure you are in this correct directory before creating the soft link.
- Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.8.0_73/lib/ amd64 / libnpjp2.so
- A soft link from the Java JRE (Java Application Runtime) plug -in libnpjp2.so to Mozilla Firefox will be initialized.
Reminder:
- ln: creating symbpic link `./libnpjp2.so’: File exists
- To fix this, you just need to remove the pre-existing soft link with the following command:
- Type/Copy/Paste: cd /usr/lib/mozilla/plugins
- Type/Copy/Paste: sudo rm -rf libnpjp2.so
- Make sure you are in the correct directory /usr/lib/mozilla/plugins and then run the command
wikiHow is a “wiki” site, which means that many of the articles here are written by multiple authors. To create this article, 14 people, some of whom are anonymous, have edited and improved the article over time.
This article has been viewed 3,482 times.
In this article, wikiHow will show you how to install 32-bit and 64-bit Oracle Java 7 JRE (at the time of this article, latest version is 1.8.0_73 ) on 32-bit Ubuntu operating system and 64-bit. This guide also works for Debian and Linux Mint operating systems. Derived from the request of many users who just want to know how to install Oracle Java JRE on Ubuntu, this article is dedicated to those who just want to install Oracle Java JRE on Debian-based Linux computers like Debian, Ubuntu and Linux Mint. You will only be able to run and execute Java programs, but not develop and program in Java. In addition, we also have a section to talk about how to use the Oracle Java JRE in your browser using this method. You can apply for Debian, Ubuntu and Linux Mint.
In conclusion, installing Oracle Java JRE on Ubuntu Linux is a relatively straightforward process that requires a few simple steps. By following these steps, users can easily bring the power and functionality of Java to their Ubuntu Linux systems.
Firstly, it is crucial to ensure that the system is updated and upgraded to the latest version before beginning the installation process. This ensures that any potential conflicts or compatibility issues are minimized.
Next, it is important to download the appropriate version of the Oracle Java JRE for Ubuntu Linux from the official Oracle website. This ensures that the user gets the most up-to-date and secure version of Java for their system.
Once the download is complete, it is necessary to verify the integrity of the downloaded file to prevent any potential security risks. This can be done by comparing the MD5 checksum of the downloaded file with the one provided on the Oracle website.
After verifying the file, the installation process can be initiated. This involves navigating to the directory where the downloaded file is located and running the installation command. This prompts the Ubuntu system to start the installation process and guides the user through the necessary steps.
After the installation is complete, it is recommended to verify that Java has been successfully installed on the system by running a simple command in the terminal to check the Java version. If the version information is displayed, it indicates that Java is installed and ready to be used.
Overall, installing Oracle Java JRE on Ubuntu Linux is a crucial step for users who require Java functionality on their systems. By following the outlined steps, users can easily bring the power and versatility of Java to their Ubuntu Linux setups, enabling them to run Java-based applications and enjoy the many benefits that it offers.
Thank you for reading this post How to Install Oracle Java JRE on Ubuntu Linux at Thptlaihoa.edu.vn You can comment, see more related articles below and hope to help you with interesting information.
Related Search:
1. Step-by-step guide to install Oracle Java JRE on Ubuntu Linux
2. Oracle Java JRE installation tutorial for Ubuntu Linux
3. Installing Oracle Java JRE on Ubuntu Linux: comprehensive guide
4. Easy ways to install Oracle Java JRE on Ubuntu Linux
5. Troubleshooting tips for installing Oracle Java JRE on Ubuntu Linux
6. Oracle Java JRE installation prerequisites for Ubuntu Linux
7. Command line method to install Oracle Java JRE on Ubuntu Linux
8. Installing Oracle Java JRE on Ubuntu Linux via PPA repository
9. Installing specific version of Oracle Java JRE on Ubuntu Linux
10. Advantages of using Oracle Java JRE on Ubuntu Linux