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

You may also like...

86 Responses

  1. Fiuza says:

    Hello there…
    Here it worked very well!
    Thank’s a lot!

  2. Geekboy says:

    Worked Great! Thanks!

  3. dimbulb says:

    Just curious, why not openjdk?

  4. Xsoldier2000 says:

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

  5. ardlian says:

    thanks a lot…

  6. Great article! I triple checked by accessing http://www.java.com/en/download/installed.jsp?detect=jre&try=1 to do a test with their service. Works well in Firefox after the installation was complete!

  7. Arup Roy Chowdhury says:

    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.

  8. Hussain says:

    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.

  9. Rhishisikk says:

    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?

  10. Limpalot says:

    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 🙂

  11. Pablo says:

    Thanks it goes wonderfully!!!

  12. Anshuman says:

    is there anyway to upgrade the jre version to 1.6 u14

  13. Aragorn says:

    hi there

    thanks for doing all thing

    sorry my english!!!

  14. John Ståhle says:

    Nice – except it doesn’t work on my UBUNTU 9.04.

    I get the screen as shown in:

    http://www.ubuntugeek.com/wp-content/uploads/2009/04/l1.png

    and that’s it.

    Y y yes Yes YES Ok OK CR mouseClick etc. doesn’t work at all.

    Whatze zi matter?

  15. jon says:

    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.

  16. John Ståhle says:

    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

  17. matthew says:

    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)

  18. John.St says:

    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.

  19. John.St says:

    – forgot to mention that sometimes you need to run
    sudo apt-get -update
    a couple of times.

  20. matthew says:

    thanks John, I finally have java!

  21. JoeEd says:

    Worked like a charm…
    thanks man!

  22. frank says:

    all best, java running

  23. Paul says:

    after i put in this –

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

    – and everything was downloaded i got the screen below as you said.

    http://www.ubuntugeek.com/wp-content/uploads/2009/04/l1.png

    how can i get past this screen , i cant click ok or or press enter to get past it 🙁
    i think this is my only problem.

    thank you for help.

  24. John.St says:

    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.

  25. Marti C. says:

    Works! Thanks a lot 🙂

    Cheers,
    Marti

  26. hilton says:

    very straight-forward and it worked immediately. many thanks!(^_^)

  27. piiters says:

    thanks. it works on my ubuntu 9.04. manuals in java.com site suckz 😀

  28. rbeatty01 says:

    Worked perfect for me. I needed this to edit Google apps. I couldn’t do it until I followed these instructions. Thanks.

  29. Reg says:

    That thing where you can’t select , just hit , see it highlighted red and hit enter, etc…

  30. Reg says:

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

Leave a Reply

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