How to Install Java Runtime Environment (JRE) in Ubuntu 9.04 (Jaunty)

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.

Currently Ubuntu has the following Java packages

sun-java6-bin -- Contains the binaries

sun-java6-demo -- Contains demos and examples

sun-java6-doc -- Contains the documentation

sun-java6-fonts -- Contains the Lucida TrueType fonts from the JRE

sun-java6-jdk -- Contains the metapackage for the JDK

sun-java6-jre -- Contains the metapackage for the JRE

sun-java6-plugin -- Contains the plug-in for Mozilla-based browsers

sun-java6-source -- Contains source files for the JDK

Installing the Java Runtime Environment

First you need to check multiverse repository enabled or not after that open a terminal window. Since you are going to be installing the JRE and the web browser plug-in, you’ll be using the following command from a terminal

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

Once it downloads the 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.

l1

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.

l2

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

You should get similar output

l3

Testing Java Plugin for Firefox

open Firefox and typing about:plugins in the address bar and check for java plugin

l4

Sponsored Link

Incoming search terms:

Related posts

86 thoughts on “How to Install Java Runtime Environment (JRE) in Ubuntu 9.04 (Jaunty)

  1. Are these the same commands if installing on an x64 version? If not, can anyone point me in the right direction?

    [Reply]

  2. Sun Java can be installed from Add/Remove, in case of x64 Jaunty, it will install the x64 version of Java. The plugin needs to be activated in FF by going to Java tester site at http://www.javatester.org It will then ask to install the missing plugin and you will have choice of Iced-Tea or Sun Java, select Sun Java and restart browser, you are all set. In case of Opera, no plugin is needed, Opera picks up default Java install folder on its own.

    [Reply]

  3. Hi

    I installed, sudo apt-get install openjdk-6-jdk
    is there any difference between this and SunJDK6,

    Infact I did’t knew about Sun-java-6 to be installed, if both are’t for same purpose then how can I unintall openjdk?

    I’m just a beginner.

    [Reply]

  4. Thanks much, this seems to have worked when nothing I downloaded directly from Sun or Adobe web sites seemed to. Is there a tutorial for sudo, somewhere I can learn what this command is?

    [Reply]

  5. sudo is just a way to run thing as root, everything you type after “sudo” will be run as the user root.
    google apt-get for instructions of how to use it to install/remove software :)

    [Reply]

  6. Just found your site this week…
    I picked up an HP netbook (came with Windoze) & have been fighting with a variety of installs.

    Thanks for all your info here.

    [Reply]

  7. I found a simple work-around the problem described by self July 16, 2009.

    The “Synaptic Package Manager” front end display the answerbox in a way, which accept my answers.

    JRE now installed under U 9.0.4

    [Reply]

  8. I tried to download java using this method, but this is what happened:

    matthew@matthew-desktop:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
    [sudo] password for matthew:
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    You might want to run `apt-get -f install’ to correct these:
    The following packages have unmet dependencies:
    sun-java6-jre: Depends: java-common (>= 0.24) but it is not going to be installed
    Depends: sun-java6-bin (= 6-14-0ubuntu1.9.04) but it is not going to be installed or
    ia32-sun-java6-bin (= 6-14-0ubuntu1.9.04) but it is not installable
    sun-java6-plugin: Depends: sun-java6-bin (= 6-14-0ubuntu1.9.04) but it is not going to be installed
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
    matthew@matthew-desktop:~$

    If you could tell me what I might have done wrong or what I could do it would be very helpful (btw, im new to Ubuntu, so please make the directions simple if you can)

    [Reply]

  9. matthew, open a terminal window.
    Write:

    sudo ls

    (give password – sudo remembers for app. 10 minutes, so this is cheat to let you use sudo w/o password).

    Write:

    sudo apt-get -f install
    sudo apt-get -update

    this should clean up
    Start (from menu)
    System > Synaptic Package Manager

    Select All
    Write jre in search window

    This is how I worked around the problem.

    [Reply]

  10. Paul,

    that was exactly my problem too.

    Kill the process using from Menu:
    System -> Administration -> System Monitor

    Read my above work around: ‘July 26, 2009 at 7:47 am’ + addition 7:49 am.

    [Reply]

  11. Sorry, some text missing there,
    Just hit tab to higlight ok at the prompt, then hit enter and enter again at the yes promt…

    [Reply]

Leave a comment

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