How to Install Oracle Java on Ubuntu Linux
Optional: How to Enable Oracle Java on Web Browser
To enable the Java plug-in on a web browser, you must create a symbolic link from the browser's plug-in directory to the location of the Java plug-in in the Oracle Java partition.
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.
You should read it
- How to Install Oracle Java JRE on Ubuntu Linux
- Oracle wants to turn Java EE into fully open source
- How to Install Android on Ubuntu Linux with Eclipse IDE
- How to Use R Language to Connect with an ORACLE Database
- How to install Java Runtime in Ubuntu
- How to troubleshoot Ubuntu problems does not start
- How to Install JDK in Linux
- How to install Java on a Raspberry Pi
May be interested
- This is one of the reasons why Linux is more secure than other operating system platformsalthough not the most commonly used operating system in the world, or as widely known as its competitors.
- Top 8 most beautiful Linux distributions in 2022the open source nature and large number of distributions available make linux the preferred choice for beginners as well as advanced users. most linux distributions provide a commendable and superior desktop experience.
- 5 major developments in Linux desktop in 2022linux is the dominant operating system on servers, but it is less known as a desktop operating system. however, the linux desktop has come a long way in the past decade and the momentum is not slowing down.
- 5 reasons to install Linux on old computersa lot of people like to use linux on older machines. everyone has a different reason. some people may want to save money by not upgrading to a new computer, while others may want to avoid wasting usable electronics.
- 5 ways to improve Linux user account securitythe first and most important step to secure linux servers and systems is to prevent unnecessary access by malicious parties. proper user account control is one of many ways to increase the security of your system.
- 5 reasons why Linux distros create their own desktop environmentmost of us don't think of the desktop as separate from the operating system. the desktop is what you see on the screen - as with windows or macos. on linux, desktop options are extremely diverse.