How to Upgrade Oracle Java on Ubuntu Linux
Inform your Ubuntu Linux system where your Oracle Java JRE/JDK is located, now you will want to update the system to use Oracle Java 1.7.0_40 Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/java" "java"...
Step-by-Step Guide
-
Step 1: Inform your Ubuntu Linux system where your Oracle Java JRE/JDK is located
/etc/profile Note your system wide PATH /etc/profile file will reload after reboot of your Ubuntu Linux system , Type/Copy/Paste: java
-version this command displays the version of Java running on your system ,, Type/Copy/Paste: cd /usr/local/java Type/Copy/Paste: sudo rm
-rf jdk1.7.0_40 Type/Copy/Paste: sudo rm
-rf jre1.7.0_40 , -
Step 2: now you will want to update the system to use Oracle Java 1.7.0_40 Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.7.0_40/bin/java" 1 Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_40/bin/javac" 1 Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jre1.7.0_40/bin/javaws" 1
-
Step 3: Inform your Ubuntu Linux system
-
Step 4: that Oracle Java JRE 1.7.0_40 must be the new default Java Type/Copy/Paste: sudo update-alternatives --set java /usr/local/java/jre1.7.0_40/bin/java Type/Copy/Paste: sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_40/bin/javac Type/Copy/Paste: sudo update-alternatives --set javaws /usr/local/java/jre1.7.0_40/bin/javaws
-
Step 5: Reload your system wide PATH /etc/profile by typing the following command: Type/Copy/Paste: .
-
Step 6: Test to see if the new version of Oracle Java was installed correctly on your system by running the following commands and noting the version number of the new Java update.
-
Step 7: You should receive a message which displays: java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b08)Java HotSpot(TM) 64-Bit Server VM (build build 25.1-b02
-
Step 8: mixed mode) Type/Copy/Paste: javac -version this command lets you know that you are now able to compile java programs from the terminal You should receive a message which displays: javac 1.7.0_40
-
Step 9: Afterwards
-
Step 10: you have the option of removing the old Oracle Java JDK/JRE
-
Step 11: by simply removing the directory's which hold the old Java JDK/JRE binaries.
-
Step 12: Reboot your Ubuntu Linux system and your system will be fully configured for running and developing Java programs.
Detailed Guide
/etc/profile Note your system wide PATH /etc/profile file will reload after reboot of your Ubuntu Linux system , Type/Copy/Paste: java
-version this command displays the version of Java running on your system ,, Type/Copy/Paste: cd /usr/local/java Type/Copy/Paste: sudo rm
-rf jdk1.7.0_40 Type/Copy/Paste: sudo rm
-rf jre1.7.0_40 ,
About the Author
Jose Ortiz
Brings years of experience writing about crafts and related subjects.
Rate This Guide
How helpful was this guide? Click to rate: