Java is developed by Sun Microsystems in the early 1990. This an Object Oriented Programming language. Java applications are compiled to bytecode, which executes runtime is either interpreted or compiled in to native machine code for execution.

This language itself derives much of its syntax from C and C++ programming language but has a simpler and parted in objects which have fewer low-level facilities. JavaScript, a scripting language, shares alike name and has similar syntax, but is not directly related to Java.

Currently Ubuntu has the following Java packages

  • sun-java6-bin – It contains the binaries
  • sun-java6-demo – It contains demos and examples
  • sun-java6-doc – It contains the documentation
  • sun-java6-fonts – It contains the Lucida TrueType fonts from the JRE
  • sun-java6-jdk – It contains the metapackage for the JDK
  • sun-java6-jre – It contains the metapackage for the JRE
  • sun-java6-plugin – It contains the plug-in for Mozilla-based browsers
  • sun-java6-source – It contains source files for the JDK

How to install Java Runtime Environment

Step1: First you need to check repository is created and enabled or not, after that open a terminal window. Since you are installing the JRE and the 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

Step2: Once it will download the packages and begins the installation, you’ll get a screen that contains the Sun Operating System Distributor License for Java.

Step3: Now hit Enter button to continue. You’ll see a dialog box that asks you if you agree with the DLJ license terms. You need to Select Yes, and hit Enter button; the JRE will finish installing.

No Need to confuse about DLJ. Let me define it for your better


DLJ – The DLJ is a license made specifically for individuals and communities who want to distribute Sun’s binary file Java Development Kit (JDK) or Java Runtime Environment (JRE) with a Red Hat Linux or OpenSolaris Operating System (OS) distribution.

Testing Java Runtime Environment

Now it is time and basic requirement to confirm that your system is configured properly for Sun’s JRE. You can check by using two steps.

First, check that the JRE is properly installed by running the java -version

How to Test Java Plugin for Firefox

You need to open Mozilla Firefox and type about plug-in in the address bar and check for java plugin.

How to Enable Java Runtime Plug-in

Steps: Go to Edit –> Preference –> Content –> Enable Java