April 15, 2007 · General · Email This Post
Share

If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!

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. 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

You should get similar output

java version “1.6.0″
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
Testing Java Plugin for Firefox

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

  • Share/Bookmark

Related Articles

100 Comments to “How to Install Java Runtime Environment (JRE) in Ubuntu”

  1. Chris says:

    Try this - go to http://www.java.com , click “Do I have Java?”, Firefox will say you are missing a plugin, let it install Java. Done!

  2. Titus says:

    I am new in Ubuntu 7.10. However I want to Install Java Runtime Environment so as to install cafepilot software. I down loaded jre-6u16-linux-i586.bin self extracting. But I have been unable to install.
    At least I know that I have to go to the root so I type sudo -i
    and I put there the password. Please help me out step by step
    Thank you
    my email address is titus.gitau@gmail.com

  3. admin says:

    Try to install the following packages

    sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts

    Make sure you have enabled universe,multiverse repositories

  4. Bob says:

    Thanks! Much more helpful than what I found with numerous other Google searches. Appreciated!

  5. Prasadh says:

    this link helped me to resolve the Java plugin problem in Ubuntu 9.0.4 version with firefox. Thanks to the owner.

  6. I tried installing sun-java6 on ubuntu 9.04 (for runescape) but didn’t work…
    any suggestions???

  7. a sandwhich says:

    Hey,iv installed bothe 5 and 6 of the jre and jdk and i still can’t run dr java. Any suggestions?

  8. Alex says:

    Alex .G., I also tried to install JRE for Runescape amongst other several reasons. You should download Ubuntu 9.10 and install it, although you could have issues with your WiFi. It worked fine for me on Karmic (9.10). Hope I could help you!

  9. Alex says:

    Just checked. Something is wrong with my Java too. Going to investigate.

  10. sassy says:

    okay so I have ubuntu on my computer great i type in what has been suggested it started then stops and says can’t find. so I go the java website listed do what it says do i have linux 6 u-i586.bin on my computer will not open and the terminal will not recognize it. so now what do i do? i’m to the point i will let you do the work remotely if you like because i’m pretty good on computers but i don’t know about this program thought it was suppose to easy but you can’t doin anything because you can’t the damn thang to work right. PLEASE PLEASE PLEASE HELP ME!!!

Leave a Reply