Table of Contents
Optional: How to Enable Oracle Java on Web Browser

This practical guide explains how to install oracle java on ubuntu linux with clear steps and useful context. It also covers common requirements, potential problems, and the details that can help you get better results.
Important Note: You should be careful when activating Oracle Java 7 in your web browser because of the fact that Java has a multitude of security holes and exploits. More importantly, when activating Oracle Java 7 on a web browser, if there is a security hole or exploit, this is a weak point for bad guys to infiltrate and harm your system. For more information about Java vulnerabilities and exploits, visit the website: Java Tester
Google Chrome
Oracle Java 32-bit Tutorial:

Execute the following command.
Type/Copy/Paste: sudo mkdir -p /opt/google/chrome/plugins
Here is the command to create the directory /opt/google/chrome/plugins
Type/Copy/Paste: cd /opt/google/chrome/plugins
This is the command that takes you to the google chrome plugin folder, remember to go to this folder before creating the icon link
Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.7.0_45/lib/i386/libnpjp2.so
This is the command to create a symbolic link from the Java JRE( Java Runtime Environment ) plugin libnpjp2.so to the Google Chrome browser.
Oracle Java 64-bit Tutorial:

Execute the following command.
Type/Copy/Paste: sudo mkdir -p /opt/google/chrome/plugins
Here is the command to create the directory /opt/google/chrome/plugins
Type/Copy/Paste: cd /opt/google/chrome/plugins
This is the command that takes you into the google chrome plugin directory, make sure you go into the directory before creating the icon link.
Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.7.0_45/lib/amd64/libnpjp2.so
This is the command to create a symbolic link from the Java JRE (Java Runtime Environment) plugin libnpjp2.so to the Google Chrome browser.
Remind:

Note: When executing the above commands, sometimes you get the following message:
ln: creating symbolic link `./libnpjp2.so': File exists
To fix this problem, simply remove the previous 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 /opt/google/chrome/plugins directory before executing the command.

Restart the web browser and go to Java Tester to check if Java is working or not.
Mozilla Firefox
Oracle Java 32-bit Tutorial:

Execute the following command.
Type/Copy/Paste: cd /usr/lib/mozilla/plugins
This is the command that takes you to the plugin directory /usr/lib/mozilla/plugins, create this directory if not already there.
Type/Copy/Paste: sudo mkdir -p /usr/lib/mozilla/plugins
Here is the command to create the /usr/lib/mozilla/plugins directory, make sure you are in the directory before creating the symbolic link.
Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.7.0_45/lib/i386/libnpjp2.so
This is the command to create a symbolic link from the Java JRE(Java Runtime Environment) plugin libnpjp2.so to the Mozilla Firefox web browser.
Oracle Java 64-bit Tutorial:

Execute the following command:
Type/Copy/Paste: cd /usr/lib/mozilla/plugins
This is the command that takes you to the /usr/lib/mozilla/plugins directory, create this directory if not already there.
Type/Copy/Paste: sudo mkdir -p /usr/lib/mozilla/plugins
Here is the command to create the /usr/lib/mozilla/plugins directory, make sure you are in the directory before creating the symbolic link.
Type/Copy/Paste: sudo ln -s /usr/local/java/jre1.7.0_45/lib/amd64/libnpjp2.so
This is the command to create a symbolic link from the Java JRE(Java Runtime Environment) plugin libnpjp2.so to the Mozilla Firefox web browser.
Remind:

Note: Sometimes you execute the above commands and get the message:
ln: creating symbolic link `./libnpjp2.so': File exists
To fix this problem, simply remove the previous 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 /usr/lib/mozilla/plugins directory before executing the command.
Restart the web browser and visit the Java Tester page to check if Java is already working in the browser.
Conclusion
Understanding Oracle Java makes it easier to compare options, avoid common mistakes, and apply the information in this guide more effectively. Review the relevant requirements before making changes or choosing a solution.
FAQ
How do you install oracle java on ubuntu linux?
Follow the steps in this guide in order, confirm the required settings or tools, and verify the result before making additional changes.
Is it safe to install oracle java on ubuntu linux?
It is generally safe when you follow the recommended instructions, use trusted tools, and avoid changing settings you do not understand.
What should you do if the process does not work?
Recheck the requirements, restart the device or application when appropriate, and review each step for missed settings or compatibility issues.
Reader Comments 0
Sign in with email or Google to join the discussion.