You are viewing the article How to Install Oracle Java JRE on Ubuntu Linux at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.
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.
Thank you for reading this post How to Install Oracle Java JRE on Ubuntu Linux at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.
Related Search: