AbstractThis blog entry will guide you through the step-by-step installation of Java on Ubuntu. I selected Oracle Java 7 update 25 and Ubuntu Linux 12.10 32 bit for this post.
IntroductionInstalling Java on Linux follows the download-extract-configure pattern. We will begin by downloading Oracle Java from Oracle’s website, extracting the download in the appropriate folder, and finally informing Ubuntu about the newly installed version of Java.
Step 1: Verify that you do not already have the correct version of Java installed.Open your console window and enter the following command:
If you get the following result, you already have Java 7 update 25 installed and can ignore the rest of the steps:
Step 2: Download Oracle Java.New release of Java are featured on the main Java download page.
If Java 7 update 25 is no longer featured, you can find the download by following the Previous Releases link found on the main download page.
Open the Java download page in your browser and download jdk-7u25-linux-i586.bin.
Make a note of the folder to which you downloaded the file. For further reference in this blog, I will call this folder the “downloads folder”.
Step 3: Create the installation folder.The
usr/lib/jvmis the default installation location of the Java JDK. Enter the following command in your console to create this folder, if it does not already exist:
–poption ensures that all folders in the
mkdirpath are created.
Step 4: Navigate to the “downloads folder”.If you downloaded the file to your Home folder, you can use the following command:
"~/"with the path to the “downloads folder”.
Step 5: Move the downloaded archive to the installation folder.
Step 6: Navigate to the “installation folder”.
Step 7: Unpack the tarball archives.
If you want to conserve space you may delete the tarball archives.
Step 8: Display the contents of the installation folder.
Make a note of the newly created folder names.
Step 9: Inform Ubuntu where your Java installation is located.
Step 10: Inform Ubuntu that this is your default Java installation.
Step 11: Update your system-wide PATH.Edit your
Add the following entries to the bottom of your
CTRL + X.
Step 12: Reload your system-wide PATH.
Step 13: Test your new installation.