wirelessmeshnetwork

Just another WordPress.com site

Posts Tagged ‘Sun Java jdk

Installing Sun Java JDK and JRE in Ubuntu 10.10

leave a comment »

While trying to install Sun java in ubuntu 10.10 ,I got the error

sudo apt-get install sun-java6-jre sun-java6-plugin
Reading package lists… Done
Building dependency tree
Reading state information… Done
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

Package sun-java6-plugin 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
E: Package ‘sun-java6-plugin’ has no installation candidate

 SOLUTION :Install sun-java6 packages from the Canonical Partner Repository

The above step may also be performed  Add this line to your /etc/apt/sources.list file

deb http://archive.canonical.com/ubuntu maverick partner

sudo nano /etc/apt/sources.list # uncomment the two lines referring to "partner" 
  •        Run an update for the new repository

sudo apt-get update

  • Now you can install the Sun JDK
    sudo apt-get install sun-java6-jdk

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.

umair@umair-VirtualBox:~$ java -version
java version “1.6.0_26”
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
umair@umair-VirtualBox:~$

Advertisements

Written by umairahmedshah

July 25, 2011 at 7:43 PM