5 Replies Latest reply: Feb 8, 2013 6:04 AM by 989896 RSS

    Installing Java on Ubuntu 10.04 LTS

    989896
      These are the steps I took to install Java on Ubuntu 10.04LTS:

      1. I downloaded jre-7u13-linux-i586.tar.gz from
      http://www.java.com/en/download/linux_manual.jsp?locale=en

      2. I read the instructions here:
      http://www.java.com/en/download/help/linux_install.xml#Java%20for%20Linux%20Platforms

      3. I entered these commands:
      sudo mkdir /usr/java
      cd /usr/java
      sudo mv /home/sitara/Downloads/jre-7u13-linux-i586.tar.gz /usr/java
      sudo tar zxvf jre-7u13-linux-i586.tar.gz

      4. Instructions say this:
      Unpack the tarball and install Java
      tar zxvf jre-7u7-linux-i586.tar.gz

      The Java files are installed in a directory called jre1.7.0_07 in the current directory.
      In this example, it is installed in the /usr/java/jre1.7.0_07 directory.
      When the installation has completed, you will see the word Done.
      Delete the .tar.gz file if you want to save disk space.
      ======================================

      My question is:

      Once jre-7u7-linux-i586.tar.gz has been uncompressed, what else needs to be done?
      I did not see the word "Done".
      The program is uncompressed but not installed at that point, correct?
      The instructions do not say what command should be entered to run the installer.
      In my case would that be:
      sudo /usr/java/jre1.7.0_13/bin/java
      ???
        • 1. Re: Installing Java on Ubuntu 10.04 LTS
          r035198x
          You only need to uninstall it to start it using it. You could now proceed to add it to your path by updating your profile file or make it the default if you had others by running
          sudo update-alternatives --config java
          • 2. Re: Installing Java on Ubuntu 10.04 LTS
            989896
            sitara@mike-desktop:~$ sudo update-alternatives --config java
            [sudo] password for sitara:
            update-alternatives: error: no alternatives for java.
            sitara@mike-desktop:~$


            "You only need to uninstall it to start it using it. You could now proceed to add it to your path by updating your profile file or make it the default if you had others by running"

            1. I was not talking about uninstalling anything.
            2. You only need to uninstall it to start it using it"??? What does that mean? Did you mean "install"?
            3. What must I add to myu path? PATH=$PATH:/usr/java/jre1.7.0_13/bin ???
            4. What profile should I update? I updated the $PATH in ~/.bashrc
            5. What was this command supposed to do? sudo update-alternatives --config java
            6. If I go to Ubuntu Software Center -> Installed Software. I do not see that Java has been installed.

            Michael
            • 3. Re: Installing Java on Ubuntu 10.04 LTS
              sabre150
              3. What must I add to myu path? PATH=$PATH:/usr/java/jre1.7.0_13/bin ???
              Yes - basically just that but I do a couple of extra things. I make a soft link in /usr/java from /usr/java/jdk to /usr/java/jre1.7.0_13 and then modify the PATH at the end of /etc/bash.bashrc using PATH=$PATH:/usr/java/jre/bin .

              This means that all profiles will now be able to use the JRE and I can have multiple JRE version installed in /usr/java and just change the soft link to change which JRE is being used.
              6. If I go to Ubuntu Software Center -> Installed Software. I do not see that Java has been installed.
              You don't need to see it installed. It is in effect installed once you update the PATH.

              Since you are only installing the JRE and not the JDK I assume you only want to run already compiled Java programs and not actually program in Java yourself. Is that right?
              • 4. Re: Installing Java on Ubuntu 10.04 LTS
                r035198x
                Oh dear, I meant extract. You only need to extract it. Sorry for the typo.

                3.) Something like that, yes
                4.) exact file depends on your build. This is all optional ofcourse. All we are trying to do is set a default which is not strictly required
                5.) Locates all the java programs available on your computer and asks you to chose which one you want to set as default
                6.) I don't know I've never used that software center
                • 5. Re: Installing Java on Ubuntu 10.04 LTS
                  989896
                  I am just trying to run Java programs.
                  I am trying to get Webex running on Ubuntu 10.04LTS.
                  Looks like I was able to follow your instructions, Thanks!

                  sitara@mike-desktop:/usr/java$ sudo ln -T --symbolic /usr/java/jre1.7.0_13/bin
                  /usr/java/bin
                  sitara@mike-desktop:/usr/java$ ls -la
                  total 47012
                  drwxr-xr-x 3 root root 4096 2013-02-08 07:45 .
                  drwxr-xr-x 12 root root 4096 2013-02-07 17:34 ..
                  lrwxrwxrwx 1 root root 25 2013-02-08 07:45 bin -> /usr/java/jre1.7.0_13/bin
                  drwxr-xr-x 6 500 500 4096 2013-01-30 03:50 jre1.7.0_13
                  -rw-r--r-- 1 sitara sitara 48124432 2013-02-07 17:46 jre-7u13-linux-i586.tar.gz

                  sitara@mike-desktop:/usr/java$ sudo vim ~/.bashrc

                  Closed all terminal windows, then opened one.

                  sitara@mike-desktop:~$ echo $PATH
                  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/sitara/ti-sd
                  k-am335x-evm-05.06.00.00/linux-devkit/bin:/usr/java/bin/
                  sitara@mike-desktop:~$

                  Michael