Howto install Sun Java Runtime Environment (JRE) in Ubuntu 10.04 (Lucid Lynx)

Sponsored Link
Java is an object-oriented programming language developed by Sun Microsystems in the early 1990s. Java applications are compiled to bytecode, which at runtime is either interpreted or compiled to native machine code for execution.
The language itself derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. JavaScript, a scripting language, shares a similar name and has similar syntax, but is not directly related to Java.

We have already posted about sun java was moved to the Partner repository in Ubuntu 10.04 (Lucid)

Procedure to follow

Open terminal and run the following commands

Add partner repository using the following command

sudo add-apt-repository "deb lucid partner"

Update the source list

sudo apt-get update

Now install sun java packages using the following commands

sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

The above command will download all the required packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java and hit Enter to continue.

You’ll see a dialog that asks you if you agree with the DLJ license terms. Select Yes, and hit Enter; the JRE will finish installing.

Testing Java Runtime Environment

You’ll want to confirm that your system is configured properly for Sun’s JRE. This is a two-step process.

First, check that the JRE is properly installed by running the following command from a terminal.

java -version

Sponsored Link

Incoming search terms:

Related posts

127 thoughts on “Howto install Sun Java Runtime Environment (JRE) in Ubuntu 10.04 (Lucid Lynx)

  1. Thanks to ramesh for his comment, worked great with the single quotes! Had trouble selecting Ok for license agreement to continue, by clicking right hand arrow key, I was able to select it and hit enter and then the install finished okay. Then select SUN Microsystems Inc. version 1.6.0_22 in OO Base, Tools, Options, to update Java. Thanks!

  2. whenever i run sudo apt-get update it tells me

    E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

  3. sudo: add-apt-repository: command not found.

    New 10.04 Ubuntu Server setup (command line only).


    sudo apt-get install python-software-properties

    Oddly, the system only told me this when I tried running add-apt-repository without sudo. With sudo, it just failed unhelpfully. I guess the system assumes that someone who knows enough to use sudo doesn’t need any help 😛

  4. OK, after hosing my sources.list and fixing it, I get this error:

    “Package sun-java6-jre is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
    E: Package sun-java6-jre has no installation candidate.”

    I get this with both the repository path cited here, and the variant “ubuntu lucid partner” mentioned in comments on another post here, as well as with one or the other commented out.

  5. And now after all that, I find that the previous hosing seems to have interfered with with apt-get update. I ran that again with the verified clean sources.list, and now it works.

    I hope these three comments can help someone else with fat fingers 😛

  6. Help when I run the command it tells me this:
    E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

  7. Whenever I try to run the command:
    sudo add-apt-repository “deb lucid partner”

    Then it says:E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

    How can I fix this?




  9. I ran “sudo apt-get update”, and then “sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts”, it still get this error:
    E: Package sun-java6-jre has no installation candidate


  10. all installation finished .. but i can’t press enter to accept the agreement . Though restarted even java -version or java is not found

  11. following error shows , when i try to run it once again..or any other apt-get install command is given

    You might want to run `apt-get -f install’ to correct these:
    The following packages have unmet dependencies:
    sun-java6-jre: Depends: sun-java6-bin (>= 6.24-1build0.10.04.1) but it is not going to be installed or
    ia32-sun-java6-bin (>= 6.24-1build0.10.04.1) but it is not installable
    Recommends: gsfonts-x11 but it is not going to be installed
    sun-java6-plugin: Depends: sun-java6-bin (>= 6.24-1build0.10.04.1) but it is not going to be installed
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

  12. WARNING. The quotes are not the same as the bash quotes retype them manually

  13. all i did was to go to the this website after that i check all the folder for sun java in the partner folder and i download it….but have not run the application yet

  14. As stated in early thread, manually delete and retype the ” before hitting enter.

  15. Help me!
    When i try to add repository it says:
    Error: need a repository as argument
    help please

  16. Intel107: If you copy the command from the webpage, you need to change the fancy quotes to regular quotes (“) before running the command.

  17. Cannot go far then to “Konfiguracja pakietu sun-java6-jre”. Pressing ENTER does nothing. How to let the process to go and finish installation of Java Enviroment. Help, please.

  18. For Server. You need to fire up you favorite editor. Edit repository list by uncommenting. sudo nano /etc/apt/sources.list

    uncomment deb lucid partner and save. then run sudo apt-get update

    then follow instructions above

Leave a comment

Your email address will not be published. Required fields are marked *